A lot of these are often triggered accidentally, like with uncaught errors or unhandled rejections, but one of them was created with the intention of directly causing a process to terminate. Process Exit The process.exit(code) approach to process termination is the most straightforward tool at your disposal. It's very useful when building scripts when you know that your process has reached the end