TypeScript Survival Guide

Favorite typescript videos

152 — What Is Node.js (Runtime, npm, Scripts, HTTP Server)

Full companion narrative for Coding2GO's Node.js introduction — the runtime distinction, npm packages, running scripts, and a first HTTP server

Video: 152 · What is Node.js? JavaScript Back-End Tutorial | ~08:14 lesson | watch · Coding2GO

Source: this is a written companion to the video. Part of the Favorite TypeScript Videos curated path, module 00 (foundations) — the runtime prerequisite: 027 teaches the language, and this video puts it on the server. Forward, 153 tells how the runtime came to exist.

“Node.js is not a programming language. It is a server-side runtime environment.” Fabian’s opening distinction carries the whole video: one language, two runtimes, and the backend half runs on Node. Everything after — packages, scripts, servers — is what that relocation unlocks. His sequencing advice is explicit: learn JavaScript before frameworks, a roadmap 157 also preaches.

bcrypt hashing example showing npm packages doing real work

npm: one function call instead of a crypto textbook

“Just use an NPM package called Bcrypt and call a single function to encrypt the password.” The bcrypt example prices the ecosystem: password hashing is one dependency plus one call, not a hand-rolled algorithm. This is the practical meaning of a runtime with a registry — leverage over reinvention.

// one package, one call — password hashing solved
const bcrypt = require("bcrypt");
const hashedPassword = bcrypt.hashSync("password", 10);
console.log(hashedPassword);

run: scripts execute outside the browser

“And as we can see, Hello World is now printed to the console.” The fs example writes a file from a script — no DOM, no browser tab, just the process and the filesystem. The tooltip-visible writeFileSync signature in the frame is the point made visual: server JavaScript touches the machine directly.

// server-side JavaScript touches the filesystem
const fs = require("fs");
fs.writeFileSync("hello.txt", "Hello, Node.js!");
console.log("File written successfully.");

fs writeFileSync script with the tooltip-visible signature

serve: the six-line HTTP server

“response.write hello world and we also end the response with response.end.” The http module builds a server in six lines: create it, answer every request with plain text, listen on 3000. Every framework — including the Express of 155 — is convenience over exactly this primitive.

// the primitive every framework wraps
const http = require("http");
const server = http.createServer((req, res) => {
	res.writeHead(200, { "Content-Type": "text/plain" });
	res.end("Hello, World!\n");
});
server.listen(3000, () => {
	console.log("Server running at http://localhost:3000/");
});

http server creation with the PowerShell terminal confirming the run

the motive: own the backend before borrowing frameworks

The close returns to sequencing — the framework search visible in the final frame is what comes after fundamentals, not instead of them. Runtime, registry, scripts, server: four ideas that make every later Node video (153’s history, 154’s TypeScript setup, 155’s Express build) legible.

framework search results — what comes after fundamentals, not instead

The runtime entry of the foundations run: backward it assumes 027’s language knowledge, forward it authorizes 153 (how the runtime happened), 154 (typing it), and 155 (framing it). The JS-first advice pairs with 157’s project-based roadmap.

Prev: 151 — How Definitely Typed Changed TypeScript Forever · Next: 153 — Node.js, The Documentary

Transcript notes: Quotes (“Node.js is not a programming language. It is a server-side runtime environment.”, “Just use an NPM package called Bcrypt and call a single function to encrypt the password.”, “And as we can see, Hello World is now printed to the console.”, “response.write hello world and we also end the response with response.end.”) verified against the transcript segments; the bcrypt, fs, and http snippets verified against the frame captions. Screenshot refs cover 4 sampled frames in order (source frames 2, 4, 6, 8): frame-0001.png (bcrypt hashing) through frame-0004.png (framework search) — the opening bumper frame shows unrelated Sass and Chrome icons and is excluded — across the ~08:14 runtime.