Appendix. Installing Node.js

 

There are a couple of different ways to install Node.js, but the simplest way to get it installed is by visiting https://nodejs.org and clicking the Downloads link in the top navigation bar. You’ll see a page of download options for different operating systems. If you’re running Windows or Mac OS, you can choose to download one of the installers available. If you’re running Linux, you can either download a tarball of the source code and compile it or install it via a package manager. For instructions on using a Linux package manager to install Node.js, take a look at https://nodejs.org/en/download/package-manager.

Installing multiple versions of Node.js with nvm

Another option for developers running Mac OS X or Linux is to use nvm (Node Version Manager) to handle installing Node.js. nvm allows you to install multiple versions of Node.js on your computer and then switch between the different versions. This is very useful when you want to test how your code runs against newer versions of Node.js. It also enables you to work on multiple Node.js applications that are running different versions of Node.js. For more on nvm, visit https://github.com/creationix/nvm.