Sheet ⁨20⁩ · ⁨Series⁩Surveyed ⁨2026⁩
Series

Node.js Backend Essentials

Back to Series

Node.js Backend Essentials

2parts, in order. Start at the top.

CodeSnippets

2 items
Node.js Environment Variable Validation with Zod at Startup

Node.js Environment Variable Validation with Zod at Startup

Most Node.js apps treat process.env like a trusted friend. You reach into it whenever you need a value, assume the key is there, assume it's spelled right, and assume the string is actually the type

Node.js Graceful Shutdown: Handle SIGTERM in Express and Fastify

Node.js Graceful Shutdown: Handle SIGTERM in Express and Fastify

Quick Tip Node's default SIGTERM handler exits immediately, so every deploy kills your in-flight requests. Here's a shutdown handler that drains them properly, in about 80 lines. The Problem