Installing NodeJS on Linux
FIrst step: install node on your server, the node package manager is already included (npm) curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - sudo apt install -y nodejs Install yarn package manager - caches downloads sudo apt install yarn Node installed, let's head over to build our first web server! Inside an app.js file: // node server config const http = require('http'); // localhost - IP loopback connection to my machine - for now // since I don't have port forwarding setup yet const hostname = '127.0.0.1'; // default port for NodeJS: 3000 const port = '3000'; // http.createServer([options][, requestListener] // requestListener is a function // return an instance of http.server const server = http.createServer((req, res) => { // HTTP status code 200 = OK res.statusCode = 200; // setting the HTML header - metadata res.setHeader('Content-Type', 'text/plain'); // signal that all