Is there an 'exit' event I can subscribe?
ludaac opened this issue · comments
Luis Aguilar commented
I'm trying to build a simple application openning a database and making some queries in it with some commands.
To avoid open/close connections to sqlite with every command I want to have a single connection and kepp it open while vorpal is running.
Is there a way to know the 'exit' command was sent and react to it?
John C. Bland II commented
process.on('exit', (code) => {
console.log(`About to exit with code: ${code}`);
});
Luis Aguilar commented
Thanks! That makes sense. I should have read the documentation first.