Load Secrets from Environment Variables
Keep keys out of source with env vars.
Secrets Do Not Belong in Code
API keys and passwords pasted into source files leak the moment you push to Git. Keep secrets out of your repository entirely.
The Twelve-Factor Idea
The twelve-factor approach stores config in the environment, so the same code ships everywhere with no edits.
All lessons in this course
- Config Classes per Environment
- Load Secrets from Environment Variables
- Use dotenv in Development
- Toggle Debug and Feature Flags