Comparing version 1.18.7 to 1.18.8
@@ -1,1 +0,1 @@ | ||
{"name":"nodemon","homepage":"http://nodemon.io","author":{"name":"Remy Sharp","url":"http://github.com/remy"},"bin":{"nodemon":"./bin/nodemon.js"},"engines":{"node":">=4"},"repository":{"type":"git","url":"https://github.com/remy/nodemon.git"},"description":"Simple monitor script for use during development of a node.js app.","keywords":["monitor","development","restart","autoload","reload","terminal"],"license":"MIT","main":"./lib/nodemon","scripts":{"commitmsg":"commitlint -e","coverage":"istanbul cover _mocha -- --timeout 30000 --ui bdd --reporter list test/**/*.test.js","lint":"jscs lib/**/*.js -v",":spec":"node_modules/.bin/mocha --timeout 30000 --ui bdd test/**/*.test.js","test":"npm run lint && npm run spec","spec":"for FILE in test/**/*.test.js; do echo $FILE; TEST=1 mocha --exit --timeout 30000 $FILE; if [ $? -ne 0 ]; then exit 1; fi; sleep 1; done","postspec":"npm run clean","clean":"rm -rf test/fixtures/test*.js test/fixtures/test*.md","web":"node web","semantic-release":"semantic-release pre && npm publish && semantic-release post","prepush":"npm run lint","killall":"ps auxww | grep node | grep -v grep | awk '{ print $2 }' | xargs kill -9","postinstall":"node bin/postinstall || exit 0"},"devDependencies":{"@commitlint/cli":"^3.1.3","@commitlint/config-angular":"^3.1.1","async":"1.4.2","coffee-script":"~1.7.1","husky":"^0.14.3","istanbul":"^0.4.5","jscs":"^3.0.7","mocha":"^2.3.3","proxyquire":"^1.8.0","semantic-release":"^8.2.0","should":"~4.0.0"},"dependencies":{"chokidar":"^2.0.4","debug":"^3.1.0","ignore-by-default":"^1.0.1","minimatch":"^3.0.4","pstree.remy":"^1.1.2","semver":"^5.5.0","supports-color":"^5.2.0","touch":"^3.1.0","undefsafe":"^2.0.2","update-notifier":"^2.3.0"},"version":"1.18.7"} | ||
{"name":"nodemon","homepage":"http://nodemon.io","author":{"name":"Remy Sharp","url":"http://github.com/remy"},"bin":{"nodemon":"./bin/nodemon.js"},"engines":{"node":">=4"},"repository":{"type":"git","url":"https://github.com/remy/nodemon.git"},"description":"Simple monitor script for use during development of a node.js app.","keywords":["monitor","development","restart","autoload","reload","terminal"],"license":"MIT","main":"./lib/nodemon","scripts":{"commitmsg":"commitlint -e","coverage":"istanbul cover _mocha -- --timeout 30000 --ui bdd --reporter list test/**/*.test.js","lint":"jscs lib/**/*.js -v",":spec":"node_modules/.bin/mocha --timeout 30000 --ui bdd test/**/*.test.js","test":"npm run lint && npm run spec","spec":"for FILE in test/**/*.test.js; do echo $FILE; TEST=1 mocha --exit --timeout 30000 $FILE; if [ $? -ne 0 ]; then exit 1; fi; sleep 1; done","postspec":"npm run clean","clean":"rm -rf test/fixtures/test*.js test/fixtures/test*.md","web":"node web","semantic-release":"semantic-release pre && npm publish && semantic-release post","prepush":"npm run lint","killall":"ps auxww | grep node | grep -v grep | awk '{ print $2 }' | xargs kill -9","postinstall":"node bin/postinstall || exit 0"},"devDependencies":{"@commitlint/cli":"^3.1.3","@commitlint/config-angular":"^3.1.1","async":"1.4.2","coffee-script":"~1.7.1","husky":"^0.14.3","istanbul":"^0.4.5","jscs":"^3.0.7","mocha":"^2.3.3","proxyquire":"^1.8.0","semantic-release":"^8.2.0","should":"~4.0.0"},"dependencies":{"chokidar":"^2.0.4","debug":"^3.1.0","ignore-by-default":"^1.0.1","minimatch":"^3.0.4","pstree.remy":"^1.1.3","semver":"^5.5.0","supports-color":"^5.2.0","touch":"^3.1.0","undefsafe":"^2.0.2","update-notifier":"^2.5.0"},"version":"1.18.8"} |
@@ -5,3 +5,3 @@ ![nodemon logo](https://user-images.githubusercontent.com/13700/35731649-652807e8-080e-11e8-88fd-1b2f6d553b2d.png) | ||
nodemon is a tool that helps develop node.js based applications by automatically restarting the node application when file changes in the directory are detected. | ||
nodemon is a tool that helps develop node.js based applications by automatically restarting the node application when file changes in the directory are detected. | ||
@@ -255,2 +255,34 @@ nodemon does **not** require *any* additional changes to your code or method of development. nodemon is a replacement wrapper for `node`, to use `nodemon` replace the word `node` on the command line when executing your script. | ||
## Gracefully reloading down your script | ||
It is possible to have nodemon send any signal that you specify to your application. | ||
```bash | ||
nodemon --signal SIGHUP server.js | ||
``` | ||
Your application can handle the signal as follows. | ||
```js | ||
process.once("SIGHUP", function () { | ||
reloadSomeConfiguration(); | ||
}) | ||
``` | ||
Please note that nodemon will send this signal to every process in the process tree. | ||
If you are using `cluster`, then each workers (as well as the master) will receive the signal. If you wish to terminate all workers on receiving a `SIGHUP`, a common pattern is to catch the `SIGHUP` in the master, and forward `SIGTERM` to all workers, while ensuring that all workers ignore `SIGHUP`. | ||
```js | ||
if (cluster.isMaster) { | ||
process.on("SIGHUP", function () { | ||
for (const worker of Object.values(cluster.workers)) { | ||
worker.process.kill("SIGTERM"); | ||
} | ||
}); | ||
} else { | ||
process.on("SIGHUP", function() {}) | ||
} | ||
``` | ||
## Controlling shutdown of your script | ||
@@ -257,0 +289,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
103929
378
Updatedpstree.remy@^1.1.3
Updatedupdate-notifier@^2.5.0