Installing MEAN software

The programming projects for this class require you to install Node.js and MongoDB. If you don't already have these packages installed on your laptop, follow the instructions below to install them.

Installing Node.js

Install the latest "Mature and Dependable" version of Node.js (currently version 4.2.2). It can be downlaoded from the URL To verify you have Node.js and its package manager (npm), try running the commands:

node -v
npm -v
which should run and print out the version numbers of your node and npm programs.

Installing MongoDB

Install the current stable release of MongoDB from the website Unless you direct it otherwise, MongoDB will store the database in the directory /data/db (C:\data\db on Windows). Make sure this directory exists and is writable by you before starting the database.

To verify you have MongoDB installed and working try starting it with the command:

This should print a bunch of log messages including one saying "waiting for connections on port 27017". The mongod doesn't exit until the database is shut down so you will want to either run this in its own window or in background.

You should be able to directly interact with the MongoDB database by running the command:

Type help at the command prompt to see the available commands.