Skip to content

Instantly share code, notes, and snippets.

@chibani
Created November 27, 2014 15:17
Show Gist options
  • Save chibani/3f0694961254e2a73e02 to your computer and use it in GitHub Desktop.
Save chibani/3f0694961254e2a73e02 to your computer and use it in GitHub Desktop.
Handling CTRL+C on nodejs
//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