Keep production configuration explicit and secure. Document required environment variables in .env.example without placing real secrets there.
Typical configuration includes PORT, database settings, authentication secrets, allowed origins, and logging levels.
Deep dive
Fail fast on missing configuration
Required secrets and URLs should be validated during startup. A clear startup error is much easier to diagnose than a database authentication failure several minutes later.