NODE SETUP 2019

Jyotishgher Astrology
By -
0

How to Install Node.js and NPM on Windows 8 / Windows 10



we will see How to Download , install and setup a node.js development environment on Windows. Installation Steps 1. Download the Node.js Windows installer from the Nodes.js web site (https://nodejs.org).

Download for Windows (x64)


2 Run the installer (the .msi file you downloaded in the previous step.) 3. Follow the prompts in the installer. 4. Restart your computer. You may not be able to run Node.js until you restart your computer. To test Node.js 1. Open command promt and type "node -v" which will print the virsion of the node installed. 2. Also give the command "npm -v" to check the npm version. 3. Now Type "node" which will give you the node console. 4. console.log("Hello, World!"); to print hello world.




NEXT STEP :


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 .
Sample
Then Go to Browser URL:http://127.0.0.1:3000/

Post a Comment

0Comments

Post a Comment (0)