Appendix A. Installing the stack

 

This appendix covers

  • Installing Node and npm
  • Installing Express globally
  • Installing MongoDB
  • Installing Angular

Before you can build anything on the MEAN stack you’ll need to install the software to run it. This is really easy to do on Windows, Mac OS X, and the more popular Linux distributions like Ubuntu.

As Node underpins the stack, that’s the best place to start. Node now also ships with npm included, which will be very useful for installing some of the other software.

A.1. Installing Node and npm

The best way to install Node and npm depends on your operating system. When possible it’s recommended to download an installer from the Node website at http://nodejs.org/download/. This location always has the latest version as maintained by the Node core team.

A.1.1. Installing Node on Windows

Windows users should simply download an installer from the Node website.

A.1.2. Installing Node on Mac OS X

The best option for Mac OS X users is to simply download an installer from the Node website. Alternatively, you can install Node and npm using the Homebrew package manager, as detailed on Joyent’s Node wiki on GitHub at https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager.

A.1.3. Installing Node on Linux

There aren’t any installers for Linux users, but you can download binaries from the Node website if you’re comfortable working with them.

A.1.4. Verifying installation by checking version

A.2. Installing Express globally

A.3. Installing MongoDB

A.3.1. Installing MongoDB on Windows

A.3.2. Installing MongoDB on Mac OS X

A.3.3. Installing MongoDB on Linux

A.3.4. Running MongoDB as a service

A.3.5. Checking the MongoDB version number

A.4. Installing Angular