Get Node.js

To install Node.js, you have several choices based on your operating system and your comfort with building from source code.

This book assumes you’re using the latest stable version of Node.js. If you install a different version—for example, by building from the latest source code—the code examples in this book may not work. From the command line you can run node --version to see what version you have installed if you’re not sure.

​ 
$ ​node --version​
​ 
v0.10.20

The easiest way to get Node is to download an installer from nodejs.org.[5]

Another popular option is Node Version Manager (nvm).[6] If you’re using a Unix-like OS (like Mac OS X or Linux), you can install nvm like so:

​ 
$ ​curl https://raw.github.com/creationix/nvm/master/install.sh ...

Get Node.js the Right Way now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.