Skip to content

Instantly share code, notes, and snippets.

@evaporei
Created June 25, 2018 02:10
Show Gist options
  • Save evaporei/6dc33f71a50e7d00ea21afa1ac208fa4 to your computer and use it in GitHub Desktop.
Save evaporei/6dc33f71a50e7d00ea21afa1ac208fa4 to your computer and use it in GitHub Desktop.
graceful-shutdown/listening-signals.js
process.on('SIGTERM', () => console.log('term'))
process.on('SIGINT', () => console.log('int'))
process.on('SIGHUP', () => console.log('hup'))
setInterval(() => console.log('doing useless work!'), 10000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment