Tagged

Node guides

Hands-on guides that cover Node. Every command is run and verified on a live server before it is published.

Guide

Metrics 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.

7 min read
Guide

Install 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.

9 min read
Guide

Run 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.

6 min read
Guide

Keep 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.

8 min read
Guide

Building 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.

8 min read
Guide

Environment, 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.

6 min read
Guide

Clustering 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.

6 min read
Guide

Inode 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.

7 min read