nodejs don't close at end of script code example Example 1: node js quit process.exit(); Example 2: how to terminate a program in js process.exit(1)