Open Menu dzosoft
Close Menu dzosoft

   ALL ABOUT COMPUTER SCIENCE AND TECHNOLOGY


                             




Dazzle with your smile!

Publish perfectly-optimized content in 1-click









 
 
 

How to install Node.js and NPM on Windows?

 

Node.js is a run-time environment which includes everything you need to execute a program written in JavaScript.
It’s used for running scripts on the server to render content before it is delivered to a web browser.
 

Step 1:

 

Download Node.js Installer

 
Go to https://nodejs.org/en/download/ Click the Windows Installer button to download the latest default version.
 
How to install Node.js and NPM on Windows?
 
 
How to install Node.js and NPM on Windows?
 
Wait a few minutes for the file to download, then double click on the downloaded file
 
How to install Node.js and NPM on Windows?
 
Click Next
 
How to install Node.js and NPM on Windows?
 
Accept the license terms
 
How to install Node.js and NPM on Windows?
 
Choose a custom location and click Next
 
How to install Node.js and NPM on Windows?
 
You can change the way of the features where will be installed
 
How to install Node.js and NPM on Windows?
 
 
How to install Node.js and NPM on Windows?
 
 

Step 2:

 

Verify Installation

 
Open a command prompt (or PowerShell), and enter the following
 
How to install Node.js and NPM on Windows?
 
The system should display the Node.js version installed on your system. You can do the same for NPM:
 
How to install Node.js and NPM on Windows?
 
 

How to Uninstall Node.js and NPM on Windows

 
You can uninstall Node.js from the Control Panel in Windows.
 
How to install Node.js and NPM on Windows?
 
 

Write your first example Hellow Word

 
 

Step 1:

   Start by launching a text editor of your choice.
 

Step 2:

   Copy and paste the following into the text editor you’ve just opened:
var http = require('http');
    http.createServer(function (req, res) {
    res.writeHead(200, {'Content-Type': 'text/html'});
    res.end('Hello World!');
   }).listen(8080);

 

Step 3:

   Save the file, then exit. Open the PowerShell, and enter the following:
 
How to install Node.js and NPM on Windows?
 
It will look like nothing has happened. In reality, your script is running in the background.
You may see a Windows Defender notice about allowing traffic, click Allow.
 

Step 4:

   Open a web browser, and enter the following into the address bar:
   http://localhost:8080
   you should see the text Hello World!
 
How to install Node.js and NPM on Windows?
 

   Enjoy
Leave comment
          

Save nickname and email in this browser for the next time.



Loading...     
close publicity
Nord VPN