Skip to content

Glossary: Node.js Basics

Exit code

Also written: exitCode, process.exit, exit codes

The number a program hands the operating system when it ends: 0 means success and anything else means failure. Setting `process.exitCode` is preferred over calling `process.exit()`, which can cut off unfinished output; a common convention is 1 for an operational error and 2 for a usage error.

Where the book teaches it

Related terms

Usage errorOperational / programmer error