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