-
-
Save chibani/3f0694961254e2a73e02 to your computer and use it in GitHub Desktop.
Handling CTRL+C on nodejs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Gently shutdown nodejs application | |
process.on('SIGINT', function() { | |
// gently close things ... | |
process.exit(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment