How to Install Node.js and NPM on Windows 8 / Windows 10
Download for Windows (x64)
About Node.js OPEN THIS PAGE
Create a java script file in any of your folder I created in D:\Node as app.Js
const http = require('http');
const hostname = '127.0.0.1';
const port = 3000;
const server = http.createServer((req, res) => {
res.statusCode = 200;
res.setHeader('Content-Type', 'text/plain');
res.end('Hello World\n');
});
server.listen(port, hostname, () => {
console.log(`Server running at http://${hostname}:${port}/`);
});
Go to D:\Node Hit
From Windows 10 up to some versions of Windows 10, it is very simple to open a command prompt anywhere you wish, without navigation using command "cd". Try the following one. Click the mouse's right button by holding Shift key .
Then Go to Browser URL:
http://127.0.0.1:3000/
Post a Comment
0Comments