node
Run JavaScript file
TLDR
Run JavaScript file
$ node [script.js]
Start REPL$ node
Evaluate expression$ node -e "[console.log('hello')]"
Run with arguments$ node [script.js] [arg1] [arg2]
Inspect for debugging$ node --inspect [script.js]
Check syntax only$ node --check [script.js]
Print version$ node --version
Run TypeScript with loader$ node --loader ts-node/esm [script.ts]
SYNOPSIS
node [options] [script] [arguments]
DESCRIPTION
node is the Node.js JavaScript runtime. It executes JavaScript outside browsers.
The tool provides V8 engine access. Supports npm ecosystem and async I/O.
node runs JavaScript server-side.
PARAMETERS
SCRIPT
JavaScript file to execute.ARGUMENTS
Arguments passed to script.-e CODE
Evaluate code string.--inspect
Enable debugger.--check
Syntax check only.--version
Show version.--help
Display help information.
CAVEATS
V8 engine based. Single-threaded event loop. Requires node installation.
HISTORY
Node.js was created by Ryan Dahl in 2009 to bring JavaScript to server-side development.


