Capstone topics from the end of the program: how to set up a full-stack backend project, work with npm and Git, test APIs with Postman or curl, apply layering and REST habits, and prepare for deployment and the mock interview. These patterns tie Express, SQL, and deployment lessons into day-to-day engineering practice.

How to use NODE_ENV — Intermediate

Switch behavior between development (verbose logs, pretty output) and production (structured logs, no secrets in responses).
Learn: NODE_ENV signals runtime context. Development favors readable logs; production favors performance and security (no stack traces to clients, stricter log levels).

Supplementary examples

Branch config in knexfile

module.exports = {
  development: { connection: process.env.DATABASE_URL, ... },
  production: { connection: process.env.DATABASE_URL, pool: { min: 2, max: 10 }, ... },
};

Course example

// config/logger.js
const isDev = process.env.NODE_ENV !== "production";

module.exports = pino(
  isDev
    ? { transport: { target: "pino-pretty" } }
    : { level: process.env.LOG_LEVEL || "info" }
);

Additional references & examples

← All Development workflow · Misc / Other