Concept
Configuration comes from environment variables, read once at startup into a validated object. The same build then runs in every environment, and a missing variable fails fast with a clear message.
The tutor works through these with you, in conversation and code. A session ends when you have shown them, not when a video does.
A few lines that show Environment configuration doing its job.
import { z } from "zod";
const Env = z.object({
PORT: z.coerce.number().default(3000),
DATABASE_URL: z.string().url(),
JWT_SECRET: z.string().min(32),
LOG_LEVEL: z.enum(["debug", "info", "warn", "error"]).default("info"),
});
export const env = Env.parse(process.env); // throws at boot if misconfiguredReading process.env throughout the codebase. A typo in a variable name is undefined at runtime, somewhere deep in a request, instead of an error at startup.
Your roadmap puts these before Environment configuration, unless you already know them.
Once a session shows you understand Environment configuration, it comes back for review. Each review takes a minute and tells the memory model how well you still know it.
Topics that build on Environment configuration.