Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restart service documentation didn't work #70

Open
gaieges opened this issue May 16, 2018 · 0 comments
Open

Restart service documentation didn't work #70

gaieges opened this issue May 16, 2018 · 0 comments

Comments

@gaieges
Copy link

gaieges commented May 16, 2018

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));
  });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant