What is node.js?
Creators generally use node.js for producing back-end services like APIs, Web, or Mobile App. Large companies like Netflix, PayPal, etc. use node.js in their production.
How to install node.js?
There are numerous methods to install node on a computer. The approach depends on the existent development environment in the system. Getting a copy of the source code and compiling the application is one of the ways to install node in the system.
Installing it on the system after cloning the GIT repository in all three environments is another way.
Install node on Windows
Below are the steps to install node.js on windows:
Step 1: Download node.js'.msi' installer
Visit the node.js official website to install the node.js installer. Go to https://nodejs.org/en/download/ and download the MSI file that supports the respective system (32-bit or 64-bit).
Step 2: The step is to run the node.js installer, go through the following steps:
- Double-click on the MSI installer, and the setup wizard shall open.
- A window with the dialogue- Welcome to node.js setup wizard will appear. Click on next at the bottom of the window box.
In the next step, the End-user License Agreement will open up.
Carefully read the details, then check the box that say- I accept the terms in the License Agreement. Then click next.
In the step, set the destination folder where the node.js will get installed and click next.
In the custom setup box/window, click next.
In the next window box, click install. The installation shall take some time to finish.
How to check if node.js is in the system?
To check if node.js is in the system or to know the version of the node:
- Go to the terminal or PowerShell of windows
- Enter the below command-
C:\Users\Admin> node -v
After running the above command, if node.js is already there then the command prompt shall show the version of node.js.
How to update local npm(if required)?
- It organizes the modules so the node could locate them,
- and oversee dependence conflicts rationally.
One can update the npm version by running the following command:
npm install npm:global // Updates the ‘CLI’ client