node js install in windows code example

Example 1: install node using nvm windows

First install NVM - https://stackoverflow.com/questions/25654234/node-version-manager-nvm-on-windows -2.nd answer
nvm install latest
nvm use 15.4.0 [instead of 15.4.0 use whatever number cmd spills on you]

Example 2: windows install node and npm

npm init to start a new project
nodejs.org/download to download node.js

Example 3: nodejs install

var http = require('http');

http.createServer(function (req, res) {
    res.writeHead(200, {'Content-Type': 'text/html'});
    res.end('Hello World!');
}).listen(8080);

Example 4: npm

official => https://www.npmjs.com/

Tags:

Misc Example