Command Line (CL) Options in node.js

The tutorials provides the available node.js command line (CL) options to execute commands. The node.js CL provides help options and node.js version commands also.

Below given is the total list of node.js command -line (CL) options

S. Nonode.js Command -line (CL) Optionsnode.js command-line description
1v, –versionprints the current node.js version number
2-h ,–helpprints command line help options
3-e, –eval “script”evaluates the argument in JavaScript, predefined modules can also be used in script
4 -i, –interactive enables node interactive mode
5 -r, –require module preloads the required module at the startup which could be a path to the file or the node module name.
6 -p, –print “script” print /display the result
7 -c, –check script syntax check without executing
8 –no-warnings silence process warnings including deprecation
9 –trace-warnings displays stack trace for the warnings
10 –no-deprecation silence deprecation warnings
11 –trace-deprecation displays stack trace for the deprecation
12 –throw-deprecation throws deprecation errors
13 –trace-sync-io prints a stack trace whenever synchronous i/o is detected after the first turn of the event loop
14 –zero-fill-buffers Automatically zero-fills all newly allocated buffer and slowbuffer instances
15 –track-heap-objects tracks heap object allocations for heap snapshots
16 –prof-process processes V8 profiler output generated using the v8 option
17 -V8-options display V8 command line options
18 –enable-fips enables fips-compliant crypto at startup . Requires node.js to be built with ./configure –openssl-fips
19 –force-fips forces fips-compliant crypto on startup
20 –icu-data-dir=file specifies ICU data load path. (Overrides node_icu_data)
21 –tls-cipher-list=list specifies an alternative default tls cipher list. Requires node.js to be built with crypto support. (default)