No description
- Python 50.7%
- TypeScript 49.3%
| configs | ||
| python | ||
| ts | ||
| .gitignore | ||
| README.md | ||
12 Factor App Kata
Part 1 : centralized configuration
Introduction
Read the code, and notice how we can switch the Mailer API URL and the database URL form the JSON config files by setting the 'APP_ENVIRONMENT' environment variable.
Changes we want to make
- Add a "use_tls" boolean to the database configuration
- Introduce a pre-production environment in addition to the production env
- Encrypt the password databse and the secret token for the mailer
Relect on how big this changes would be in the state of the current code.
Part 2 : configuration as environment variables
Instructions
Go read the 12 Factor App documentation, especially the part about configuration:
=> https://12factor.net/config
Then refactor the code, getting rid of the 'configuration.ts' module completly.
Then, try and apply the changes listed in part 1.
Finally, try and run the code using the 'local' database and the "pre-production" mailer API.
Conclusion
List the pros and cons of having a centralized Configuration class.