node js quit
process.exit();
end code nodejs
process.exit()
node js kill process
process.exit() //or if (condition){process.exit()} //or setTimeout((function() { return process.exit(); }), 5000); // kill server after 5000ms //source : //https://stackabuse.com/how-to-exit-in-node-js/
nodejs end process
const exitCode = 3; console.log("This is executed"); process.exit(exitCode); // Ends execution console.log("This is not executed");