Tagged
Node.js guides
Hands-on guides that cover Node.js. Every command is run and verified on a live server before it is published.
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.
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.