Environments and Configuration
Keep development, test, staging, and production isolated, with deliberate configuration differences.
How to apply it
Validate required configuration at startup; document variables and rotation. Keep public frontend config separate from server secrets. Use infrastructure as code and least-privilege roles; prefer short-lived CI credentials where supported.
Worked example
Fail startup if a required database URL is missing rather than failing on the first customer request.
Common mistakes to avoid
Sharing production data with tests or committing environment secrets.
Practice task
Implement this concept in the capstone. Add one positive test, one negative or failure-path test, and a short note explaining the trade-off you chose.
- Keep development, test, staging, and production isolated, with deliberate configuration differences.
- Validate required configuration at startup; document variables and rotation.
What is the strongest production practice for Environments and Configuration?