Node.js

Website

Official Guide
(https://nodejs.org/api/http.html)
dev tools

Official Library
- HTTP

"npm" = "node package manager"

"A local development environment"

During Install:

What is it

open-source and cross-platform JavaScript runtime environment

new ECMAScript standards can be used without problems

they have a registry of all the packages and modules which is accessed by a command line interface. Think of it as the central library of code snippets that everyone can "borrow" at once. npm makes it so that you can search for specific features you need to add, (via https://www.tatianamac.com/posts/beginner-eleventy-tutorial-partii)

Examples

Official Examples on GitHub

"Hello World"
To run: save file as server.js and in terminal, run node server.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}/`);
});

Resources

Guide - W3 Schools