Run a few commands; testing the commands
Now that you've installed Node, we want to do two things; verify that the installation was successful, and familiarize you with the command-line tools.
Node's command-line tools
The basic install of Node includes two commands, node
and node-waf
. We've already seen node
in action. It's used either for running command-line scripts or server processes. The other, node-waf
, is a build tool for Node native extensions. Since it's for building native extensions, we will not cover it in this book and you should consult the online documentation at nodejs.org.
The easiest way to verify whether your Node installation works is also the best way to get help with Node. Type the following:
$ node –-help Usage: node [options] [ -e script | script.js ] [arguments] node debug script.js [arguments] Options: -v, --version print node's version -e, --eval script evaluate script -p, --print print result of --eval -i, --interactive always...