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
| Area | Items |
|---|---|
| Config | Zod env validation, .env.example, no secrets in repo |
| Security | helmet, CORS allowlist, rate limits, JWT httpOnly, SQL params |
| Runtime | NODE_ENV=production, cluster/replicas, graceful shutdown |
| Data | pg pool sized, migrations applied, Redis for queues |
| Observability | JSON logs, /health + /ready, error tracking, metrics |
| Deploy | Docker multi-stage, CI lint/typecheck/build, rolling deploy |
| Ops | Postgres backups, R2/Cloudflare, postmortem runbook |
- Before launch — load test, npm audit, penetration basics, staging smoke.
- Day one — monitor 5xx rate, pool waitingCount, memory RSS.
- 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