Nodejs Command line options
Nodejs has many commands which can be used in command line. Few of the most used options are as follows.
-v or –version used to check node version installed in the system
node -v node --version
Below SS shows the output
-c or –check command used to check the syntax without executing the script.
node -c node --check
Below SS shows the output
-h or –help used to print command line options.
node -h node --help
Below SS shows the output
-e will evaluate an argument and will not display the output. Whereas -p will evaluate and print the output.
node -p or node --print node -e or node -eval
Below SS shows the output
node or node -i used for REPL env. We have seen this in previous section.