Teach your process to shutdown gracefully.
- Friendly to your users.
- Easy to use and reason about.
- Enables zero-downtime deployments.
npm install handle-quit --save
Get it into your program.
const handleQuit = ;
Make sure your program shuts down gracefully or quickly, as necessary.
Listens for SIGINT and runs a graceful shutdown on the first signal. Calls
process.exit() upon any future SIGINT signals. Relevant shutdown messages are also printed to the console.
A function that will gracefully shutdown your program. A common example is Server#close().
See our contributing guidelines for more details.
- Fork it.
- Make a feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request.
Go make something, dang it.