Are you interested in Software as a Service (SaaS)?

Join other SaaS builders and get in depth technical content to help build your SaaS.

node.js -e vs node.js -p

By Will Laurance on 07/30/2013

The difference between node -e and node -p is p will run the script through the interpreter and print the results. The -e will only evaluate the script. The time -e will print anything is if something writes to stdout or stderr.

node.js -p

node -p "var a"

node.js -e

node -e "var a"

node.js --prof

node --prof process v8 profiler output generated

This runs the v8 profiler and generates a log of every allocation, address, and things on the stack.

node.js -g

Well someone is searching for this, and I'm sorry to say, it isn't a valid command :(

Tagged with: