async-exit-hook
Run some code when the process exits (supports async hooks and pm2 clustering)
Run some code when the process exits (supports async hooks and pm2 clustering)
Gracefully exit HTTP servers (Express/Koa/Fastify/etc), databases (Mongo/Mongoose), Bree job schedulers, and custom handlers.
ES6 JS class to capture exit signals and specify callbacks to accept or deny them
Do something before the program exits or when the program crashes!
Gracefully exit HTTP servers (Express/Koa/Fastify/etc), databases (Mongo/Mongoose), Bree job schedulers, and custom handlers.
Gracefully exit server (Koa), database (Mongo/Mongoose), Bree job schedulers, Bull job schedulers, and custom handlers.
Run some code when the process exits (supports async hooks and pm2 clustering)