This line of code should be changed to listener.processExit, as processExitListener is not defined.
What we would expect:
gulp-express will kill the current node process and remove the exit listener before starting a new node process as defined in the source (lines 62–66):
ReferenceError: processExitListener is not defined is thrown when running server.run() after already running server.run() in order to restart the server.
Practical example
gulp.task('server:start', function () {
server.run();
...
gulp.watch('./app/**', ['server:restart']);
});
gulp.task('server:restart', function () {
server.run(); // This will throw the error.
});
This line of code should be changed to
listener.processExit
, asprocessExitListener
is not defined.What we would expect:
gulp-express
will kill the current node process and remove theexit
listener before starting a new node process as defined in the source (lines 62–66):What we get:
ReferenceError: processExitListener is not defined
is thrown when runningserver.run()
after already runningserver.run()
in order to restart the server.Practical example