Comment sortir à Node. js

Mots clés : node.jsnode.js

meilleur 4 Réponses Comment sortir à Node. js

vote vote

90

process.exit() 
process.exit(1); 
vote vote

86

// This is an example of what *not* to do: if (someConditionNotMet()) {   printUsageToStdout();   process.exit(1); } 
// How to properly set the exit code while letting // the process exit gracefully. if (someConditionNotMet()) {   printUsageToStdout();     process.exitCode = 1; } 
vote vote

78

process.exit(code) 
process.exit(1); 
vote vote

60

$ node > .exit $ 

Questions similaires