What you’ll do
In this guide, you’ll: check Node.js in CMD, download it from the official website, install it with default settings,
verify node & npm, and run a simple Node.js program in VS Code.
Video Tutorial — Node.js on Windows (2025)
Watch this video to see every step visually: CMD check, download, installation, verification, and running code in VS Code.
VIDEO
Open CMD and check Node.js (before installation)
First, check whether Node.js is already installed on your system using Command Prompt.
Press Win + R → type cmd → press Enter , then run:
If you see something like 'node' is not recognized, it means Node.js is not installed yet — perfect, we’ll set it up clean.
Visit the Official Node.js Website
To stay safe and get the correct version, always download Node.js from the official website only.
Open the site in your browser. You’ll see two big buttons: LTS and Current .
For most users and beginners, LTS is recommended.
Download the LTS Version for Windows
On nodejs.org, click the green LTS download button. The site automatically selects the proper Windows installer (usually 64-bit).
A file like node-vXX.X.X-x64.msi will start downloading.
When the download is complete, you’re ready to install.
Install Node.js with Default Settings
Double-click the downloaded .msi file to start the Node.js setup wizard.
Click Next on the welcome screen.
Accept the license agreement and click Next .
Keep the default installation folder (recommended) and click Next .
Leave the default features selected (Node.js runtime, npm, etc.).
Optionally install additional tools if you know you need them (otherwise you can skip).
Recommended: keep default settings in the Node.js installer
Click Install , wait for the progress bar to finish, and then click Finish .
Verify Node.js & npm Installation in CMD
After installation, open a fresh Command Prompt window and run these commands again:
If you see version numbers (for example v22.x.x for Node and 10.x.x for npm), your installation is successful
and both Node.js and npm are ready .
Write and Run a Simple Node.js Web Server in VS Code
Now let’s confirm everything works by running a basic HTTP server using Visual Studio Code.
Open VS Code .
Create a new file and save it as app.js.
Paste the following code into the file:
// app.js
const { createServer } = require('node:http');
const hostname = '127.0.0.1';
const port = 3000;
const server = createServer((req, res) => {
res.statusCode = 200;
res.setHeader('Content-Type', 'text/plain');
res.end('Hello World');
});
server.listen(port, hostname, () => {
console.log(`Server running at http://${hostname}:${port}/`);
});
Copy
In VS Code, open the integrated terminal (View > Terminal).
Make sure the terminal path is the folder where app.js is saved.
Run this command:
Now open your browser and go to http://127.0.0.1:3000/.
If you see Hello World , your Node.js server is running correctly and your setup is complete.
You’re ready to build with Node.js
You’ve installed Node.js, verified node and npm, and run a working HTTP server from VS Code.
Next, you can explore Express.js, REST APIs, or full-stack apps with your favorite frontend framework.
https://code.visualstudio.com/
Copy
Want this converted to a PDF or printable handout for your students or video description? You can export or reuse this content anytime.