npm-watch icon indicating copy to clipboard operation
npm-watch copied to clipboard

Configure signal

Open dobesv opened this issue 7 years ago • 4 comments

It would be nice to be able to specify the signal argument to nodemon, e.g. to set SIGTERM instead of the default SIGUSR1.

dobesv avatar Jul 26 '18 18:07 dobesv

This is an area I am unfamiliar with. Could you please provide a bit more context?

M-Zuber avatar Jan 23 '19 06:01 M-Zuber

When you run nodemon you can pass a command-line parameter signal. I think when you run it using the API there must be a similar option. However, I don't think you can specify this as part of the npm-watch configuration. My suggestion is to add an npm-watch option signal which is passed through to nodemon as its signal option.

For example, see https://github.com/remy/nodemon#gracefully-reloading-down-your-script

dobesv avatar Jan 23 '19 08:01 dobesv

We are not using the api (yet?) but it looks like it should be possible to just add another option to the config

Will try and get to it soon, unless you want to give it a shot?

M-Zuber avatar Jan 24 '19 03:01 M-Zuber

TBH I've forgotten why I asked for this feature. I think I've since switched to just running nodemon directly myself as a yarn script. If nobody else has a use for it you can just close this or leave it until you get some more "thumbs up" on it or something.

dobesv avatar Jan 24 '19 06:01 dobesv