... in the previous chapters...
Run your Node.js app on Apple's container (a Docker Desktop alternative)
Apple shipped container 1.0 — an open-source, native CLI that runs Linux containers on macOS by giving each one its own lightweight micro-VM. It speaks OCI images and has a Docker-like CLI. Here's a real Node.js app built and run on it, the networking model, x86 images via Rosetta, and the gotchas — all verified on container 1.0.0 on an Apple-silicon Mac.
Node.js Docker images: full vs slim vs alpine vs distroless
Which base image should a Node.js app use? The choice swings your image from ~1.8 GB down to ~210 MB and changes how you debug and secure it. Here are the real sizes for the same app on node:26, node:26-slim, node:26-alpine, and distroless — all measured with Docker — plus the tradeoffs that actually matter.
Ship a Node.js app as a single executable binary
Node.js can bundle your script and the runtime into one executable file — a Single Executable Application — so users run your CLI without installing Node at all. Here's the full build, an embedded asset, and proof the binary runs on a machine with no Node installed. Verified on real Docker images.
The built-in Node.js test runner: a complete guide
You no longer need Jest, Mocha, or Vitest to test a Node.js project. node:test ships a complete runner — suites, hooks, mocking, filtering, watch mode, and coverage — that you run with node --test. No dependencies, no config. Every command and its output here is from a real node:26-slim Docker image.
node:sqlite: a built-in SQL database with zero dependencies
Need a database for a script, CLI, or small service? Node.js ships node:sqlite — a synchronous SQLite driver built right in. No better-sqlite3, no node-gyp, no native compile, no npm install. Here's the full API — prepared statements, transactions, and user-defined functions — verified on a real node:26-slim image.
Running TypeScript natively in Node.js: 22 vs 24 vs 26
Node.js runs .ts files directly — no ts-node, no tsx, no build step. But the details differ between Node 22, 24, and 26: what's flagged, what's stable, and one feature that was removed in Node 26. Every example here was run on real node:22-slim, node:24-slim, and node:26-slim Docker images.
Node.js features that replace popular npm packages
Node.js has quietly absorbed the jobs that used to need dependencies: a test runner, a file watcher, a .env loader, native TypeScript, fetch, terminal colors, deep clone, even SQLite. Here's what you can drop on Node.js 26 — every example verified on a real node:26 Docker image.
Modern JavaScript features you can use in Node.js 26
A batch of genuinely useful JavaScript additions is now unflagged in Node.js 26: Set operations (union, intersection, difference), lazy iterator helpers, RegExp.escape, Promise.try, Array.fromAsync, and Float16Array. Here's each one with real, verified output.
Temporal: the modern way to handle dates in Node.js
JavaScript's broken Date object finally has a replacement. Temporal — Stage 4 in ES2026 and enabled by default in Node.js 26 — brings immutable date/time types, real time-zone support, and sane arithmetic. Here's how to use it, with examples and the polyfill for older environments.
The HTTP QUERY method: GET semantics with a request body
The new HTTP QUERY method (RFC 10008, 2026) gives you the safe, idempotent, cacheable semantics of GET with the request body of POST — ideal for large or structured read operations. Here's its status, browser and server support, and a form + fetch + Node example you can actually test.
How to set up Tailwind CSS v4
Tailwind CSS v4 is CSS-first: no tailwind.config.js, no @tailwind directives, and automatic content detection. Here's how to set it up with Vite, PostCSS, or the CLI, customize your theme with @theme, and migrate from v3.
How to save a web page as PNG or PDF with Puppeteer?
Turn any web page into a PDF or a full-page PNG screenshot with Puppeteer and headless Chrome — natively, in just a few lines, with none of the Xvfb, DPI, or screenshot-stitching workarounds the old Nightmare approach required.