Install Node.js on Windows

It's really easy to install Node js if you are using Xampp or Wamp etc. has created a Windows Installer (.msi) for Node Js.

If don't have Xampp installed on your localhost, Download & Install Xammp.

Steps: How to Install Node js on Localhost:
  1. Download Windows Installer (.msi) for Node Js from Node Js Official Website.
  2. Run the Installer (.msi installer that you have downloaded) and follow the prompts steps in the installer.
  3. Congrats!, now you have installed node.js successfully with NPM and Node Modules.
Important Notes:
  1. NPM – Node Package Manager – which lets you add Node Packages/Modules like Express Js, Mongoose, PM2, Nodemailer etc very quickly and easily.
  2. Keep your Apache and Node ports different.
  3. Run - node -v on cmd to test the version of Node Js.
  4. Run - npm -v on cmd to test the version of NPM (Node Package Manager).
For Example:
// Install Express Js
>> npm install express --save
You may also like - Nodejs Interview Questions
Now, Create simple program using Node Js:
Create a test file (for example) C:\nodejs\test.js and put the below code in that file:
var http = require('http');
http.createServer(function (req, res) {
 res.writeHead(200, {'Content-Type': 'text/plain'});
 res.end('Hello World\n');
}).listen(3000, "");
console.log('Server running at');

Now, Open cmd (COMMAND PROMPT) and run following command:
>> cd C:\nodejs
>> node test.js
Open this address in your browser: