-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Description
Attempting to restart a process via the documentation in the README doesn't seem to work as expected (watch function gets called, but process doesn't get restarted). Instead I discovered that the below works well. Not sure if the documentation is off, or I'm doing something wrong, so I wanted to open a issue before a PR.
node: v10.1.0
The one that worked in restarting the process was:
gulp.task('serve', function () {
var server = gls('app/app.js');
server.start();
gulp.watch('app/**/*', function (file) {
console.log('reloading..');
// doesnt work - comes from doc
// server.notify.apply(server, [file]);
// works
server.start.bind(server)();
});
// unnecessary since file matches above watch glob
// gulp.watch('app/app.js', server.start.bind(server));
});Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels