Catch a Node program from exiting with these events. Usually useful for test frameworks or daemon runners or whatever.
process.on('uncaughtException', err => { ... }) process.on('SIGHUP', ...) process.on('exit', ...) process.on('beforeExit', ...)
You have just read Node.js exit hooks, written on February 17, 2015. This is Today I Learned, a collection of random tidbits I've learned through my day-to-day web development work. I'm Rico Sta. Cruz, @rstacruz on GitHub (and Twitter!).
← More articles