Skip to main content

Node.js CLI 1

CLI comes from Command Line Interface. Each programming language has its own way of creating CLI applications. Node.js is no different. Node.js comes with a variety of CLI options. These options expose built-in debugging, multiple ways to execute scripts, and other helpful runtime options.

Examples

Run a script

node index.js

Run a script with a flag

node index.js --stack-trace-limit=12

Run a script with watch mode

node --watch index.js