Configuration Handling in Smilecook
Most applications require multiple configurations; at least one is required for a production server, and one for development use. There will be differences between them, such as the debug mode, secret key, and database URL. We can use a default configuration that is always loaded, and a separate configuration for the production server and development environment to inherit the default configuration depending on the environment. For environment-specific configurations, we will create two new classes – DevelopmentConfig
and ProductionConfig
.
Exercise 63: Configuration Handling for the Production and Development Environments
In this exercise, we will segregate our application configurations between the development and production environments. For configurations such as DEBUG
, we will require different values for the two environments. The same goes for the database URL as well. We are therefore going to create two sets of configurations...