Node JS -  Environment Setup


Download the current version of Node from the official site: Download Node




Make sure you download the Node installer available for your Operating System.






Once you download the node, click on the Installer, which should open Node Js setup wizard.




Note: Change the path where you want to Install Node js or leave the default path as it is.







Follow the steps setup wizard takes you through. Once node Installed, Open Node js Command Prompt or the Windows command prompt.

Run a basic command to know the node's version installed in your system.

node -v   




If the Node is installed in your system correctly, this command should work and return the version of the node installed.

If you are successfully able to execute your first command in the Node js Command prompt, Congratulations! you have set up the Node environment in your system.


Npm (Node Package Manager)

npm is the package manager for Node and we will be using npm to download third-party libraries in our Node js code.

You do not have to download npm separately because npm comes with the node installer.


What Next?


You need a text editor to write your node js code and get started. There are so many popular and useful text editors and IDEs available for Node.


Choosing a Text Editor:

Below are the text editors and IDEs that work best for Node JS app development.
  1. Visual Studio Code
  2. Sublime Text
  3. Web Storm
  4. Atom
  5. eclipse


We will be using Visual Studio code for the Node js Development as it's free and easy to use.

Summary:


  1. Download Node from Its official site.
  2. Make sure to download the installer for your operating system.
  3. Once downloaded, follow the steps given in the node js set up wizard.
  4. Test your first command (node -v) in the Command Prompt to check whether the node Js is installed successfully or not.
  5. The node package manager (npm) is used to manage all third-party libraries we are going to use in our code.
  6. Choose a text editor for writing our code. We are going to use the Visual Studio Code.