Setup Node.js Development Environment:

In this section, you will learn about the tools required and steps to setup development environment to develop a Node.js application.

Node.js development environment can be setup in Windows, Mac, Linux and Solaris. The following tools/SDK are required for developing a Node.js application on any platform.

  1. Node.js
  2. Node Package Manager (NPM)
  3. IDE (Integrated Development Environment) or TextEditor

NPM (Node Package Manager) is included in Node.js installation since Node version 0.6.0., so there is no need to install it separately.

Install Node.js on Windows:

Visit Node.js official web site https://nodejs.org. It will automatically detect OS and display download link as per your Operating System. For example, it will display following download link for 64 bit Windows OS.

Download link on nodejs.org

Download node MSI for windows by clicking on Download for Windows link.

After you download the MSI, double-click on it to start the installation as shown below.

Node.js Installation

Click Next to read and accept the License Agreement and then click Install. It will install Node.js quickly on your computer. Finally, click finish to complete the installation.

Verify Installation:

Once you install Node.js on your computer, you can verify it by opening the command prompt and typing node --version. If Node.js is installed successfully then it will display the version of the Node.js installed on your machine, as shown below.

Very Node.js Installation
Verify Node.js Installation

Install Node.js on Mac:

Visit Node.js official web site https://nodejs.org, it will display download link for Mac OS.

Node Environment Setup

Download the node-v*.pkg installar for Node.js by clicking on "Download for OS X" link. Click on the .pkg installer to start the Node.js installation wizard.

Node.js Installation on OS X

Click on Continue and follow the steps. After successful installation, it will display summary of installation about the location where it installed Node.js and NPM.

Node.js Installation on OS X

After installation, verify the Node.js installation using terminal window and enter the following command. It will display the version number of Node.js installed on your Mac.

$ node --version

Visit Github to learn how to install Node.js on other operating systems.

IDE:

Node.js application uses JavaScript to develop an application. So, you can use any IDE or texteditor tool that supports JavaScript syntax. However, an IDE that supports auto complete features for Node.js API is recommended e.g. Visual Studio, Sublime text, Eclipse, Aptana etc.

Learn how to setup MS Visual Studio for Node.js development in the next section.