Lesson 23 / 23

Deploying an Express App

A quick look at taking Express to production.

The checklist

Set NODE_ENV=production, load secrets from environment variables, listen on process.env.PORT, and put a reverse proxy (nginx, or the platform's own) in front.

Keep it alive

Use a process manager like PM2, or let a platform (Render, Railway, Fly.io) manage restarts — plain node server.js dies on any uncaught crash.