Running Node.js
Now that Node is installed and configured, we're ready to start using it. However, before trying this, let's just verify that Node is installed correctly by printing its version number.
This book assumes that you're using the latest stable version of Node.js. If you have installed a different version, for example, by building from the latest unstable source code, then the examples in this chapter might not work. From the command line, you can run the following command to see which version you have installed on your system:
node --version
If the command is successful, the output will be Node's version number.
Note
At the time of writing this book, the latest stable release was Node v4.2.2.
Node provides a JavaScript runtime environment that can be accessed at any time by running the node
command from your command-line or terminal window. This feature is called the
CLI (command-line interface), and it allows you to experiment with Node. For the purpose of this book, you will be...