CSSG-Labs / CSSG-Labs/flask-todo-app
Implement application configuration management
- Dominant language
- HTML
- Stars
- 2
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
**What**
- Create a way to configure application settings based on the environment (i.e. development, production, testing)
**Why**
- Currently, configuration is handled in `__init__.py`
- Configuration should be in its own module for better organization and readability
- `__init__.py` should be mainly responsible for initializing the flask application
- It should pass the environment into `config.py` module and let it handle the configuration
- Things like database, secrets, etc can be different based on the environment of the application
- For example, for testing, you would not want to use production data as this may risk production data loss/ corruption
- As such, there needs to be way to load different configs based on the environment
**How**
- [Flask tutorial](https://flask.palletsprojects.com/en/2.1.x/config/#development-production)
**Requirements**
- Define configuration for development, testing, and production
- Feature current configs of `SECRET` and `DATABASE_PATH` for each environment
- For production, these configs should be loaded from environment variables/ file
- Create a way to choose configuration based on application environment
Contributor guide
Assessment
This issue has not been assessed yet.