As for the question, I’m trying to do some stuffs when the application is about to exit. Are there any express hooks or any solution to make the job done?
I tried something like this process.on('exit', function () { console.log('About to exit.'); });
but I’m still looking for other ways to do it.
New contributor
Mark G is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.