exit-hook
Run some code when the process exits
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.