nodejs stop script code example Example 1: node js quit process.exit(); Example 2: exit program js process.exit(1)