AceDevHub
Advanced Node.js Interview QuestionsAdvancedScenario

Node.js · Question 100

What is your production readiness checklist for a Node.js API?

Direct answer

Checklist: env validation, HTTPS via reverse proxy, helmet/CORS/rate-limit, structured logs, health/readiness probes, graceful SIGTERM shutdown, pg pool + Redis, npm audit CI, secrets in env, error monitoring, load test p99, Docker non-root, backup strategy — AceDevHub targets Docker Compose + Caddy on Hetzner.

Scenario: final interview question — walk through launching AceDevHub API to production systematically, not ad hoc toggles.

Production checklist

AreaItems
ConfigZod env validation, .env.example, no secrets in repo
Securityhelmet, CORS allowlist, rate limits, JWT httpOnly, SQL params
RuntimeNODE_ENV=production, cluster/replicas, graceful shutdown
Datapg pool sized, migrations applied, Redis for queues
ObservabilityJSON logs, /health + /ready, error tracking, metrics
DeployDocker multi-stage, CI lint/typecheck/build, rolling deploy
OpsPostgres backups, R2/Cloudflare, postmortem runbook
  1. Before launch — load test, npm audit, penetration basics, staging smoke.
  2. Day one — monitor 5xx rate, pool waitingCount, memory RSS.
  3. Ongoing — dependency updates, rotation of JWT secrets, restore drills.
production-smoke.sh
# Pre-deploy smoke
curl -sf http://localhost:4000/health
curl -sf http://localhost:4000/interviews/topics/nodejs-interview-questions | jq '.data.page.sections | length'
# Expect: 100 questions after full import