process.on('exit', ..) isn't called if the process crashes or is killed. It is only called when the event loop ends, and since server.close()sort of ends the event loop (it still has to wait for currently running stacks here and there) it makes no sense to put that inside the exit event...

On crash, do process.on('uncaughtException', ..) and on kill do process.on('SIGTERM', ..)