Installing Node.js on Windows PC

Node.js is open source JS runtime environment for executing JavaScript on server side, used for creating server-side and networking web applications. To use Node.js we need some basic command-line instructions, this is not a program that can be pinned and launched from task bar or app list.

Installing Node.js

  • Head over to the official website of Node.js
  • Download the executable file on your machine and double click to install .msi file to install on your machine
  • Once you have completed your installation, restart your machine.

Updating Node.js

To install new version of Node.js just head back to the official site of Node.js and download new version of Node.js and install on your machine which will replace the older version.

Checking out Node.js installation

  • To make sure that Node is properly installed on your machine just open command prompt and type the following command which will results version number of Node like v6.9.*

    node -v

  • To make sure that NPM (Node.js Package Manager) is properly installed on your machine type the following command on command prompt which will results version number of npm like 3.10.*

    npm -v

  • To make sure that Node works properly,
    • create and save ‘hello.js’ file on a desired place on your computer with the following simple JavaScript code

      console.log("Node.js works"); // This will just echo the text on console

    • Now navigate to the location where the hello.js file is located on your system using command prompt (windows machine) and type the following command

      node hello.js

    • The above code will execute the JavaScript code exist on the file and results on command prompt.

Capture

Uninstalling Node.js

  • Go to control panel -> Programs and Features
  • Double click the node.js  program to completely uninstall node.js on you computer

There are 470,000 free code packages are available in the npm registry to discover and use, head to npm site and to explore them.

Advertisements

One thought on “Installing Node.js on Windows PC

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s