How to setup a node.js development environment on Windows

Install node.js

It’s easy to install node.js on Windows, just go to node.js official site and download Windows installer, then execute the installer. Congratulations!!! You successfully installed node.js on Windows!!!

Install mongoDB

Go to mongoDB official site to download zip file for Windows, and unzip the contents to anywhere you like. MongoDB will read data at \data\db by default, but mongoDB won’t create this folder for us, so we must create it by ourself, you can create this folder in Windows Explorer, or type the following command in terminal:

C:\> mkdir \data
C:\> mkdir \data\db

After creating \data\db, double click mongod.exe in your_mongodb_path\bin or type the following command in terminal to turn on mongoDB:

C:\> cd your_mongodb_path\bin
C:\> mongod

Then you can double click mongo.exe or type the following command in terminal to get into administrative shell：

Update node.js

Go to node.js’s official site and download Windows installer, then execute the installer. Then your node.js is updated.

Update mongoDB

Go to mongoDB official site to download zip file for Windows, and use the files in new zip file, then you can start to use the latest mongoDB. If you have question about installng or using mongoDB, you can check the Windows Quick Start on mongoDB official site :)