Node guides
Hands-on guides that cover Node. Every command is run and verified on a live server before it is published.
GuideMetrics from Your Server
node_exporter reads your Ubuntu server's CPU, memory, disk, and load, then publishes them as Prometheus metrics. Install it and read the raw numbers yourself.
GuideInstall Node.js and Run a Real App
See the destination first, then install the Node.js LTS on a bare slice, write a small Express node.js app, and serve it live behind nginx and in a browser.
GuideRun Node.js Under systemd
Turn the node.js app into a systemd service that starts on boot and restarts on failure. Kill the process by hand and watch systemd bring it back with a new PID.
GuideKeep It Running with systemd
An app started in a terminal dies when you close it. Write a systemd service so your Node app starts on boot, restarts on crash, and logs to the journal.
GuideBuilding Your App's Image
Package a Node app into a small, non-root Docker image. Build it with a Dockerfile and learn why layer caching and COPY order decide rebuild speed.
GuideEnvironment, Config and Secrets
Configure a node.js app through the environment and keep node.js secrets in a 600 file only the service user can read, with NODE_ENV set to production.
GuideClustering Across CPU Cores
Use the node.js cluster module to run one worker per CPU core so both cores serve traffic. See the worker PIDs and prove different workers answer different requests.
GuideInode Exhaustion, du, lsof and File Limits
The full disk that still has free space on Ubuntu 24.04: inode exhaustion via df -i, big directories with du, deleted files held by lsof, and the ulimit cap.