Use dotenv in Development
Load a .env file for local config.
Exporting by Hand Gets Old
Typing export for ten variables every session is tedious and easy to forget. A .env file fixes that for local work.
What a .env File Holds
A .env file is plain text with KEY=value lines. It lives at your project root and feeds variables in automatically.
SECRET_KEY=dev-secret
DEBUG=1All lessons in this course
- Config Classes per Environment
- Load Secrets from Environment Variables
- Use dotenv in Development
- Toggle Debug and Feature Flags