Add `config` as the template's configuration library, remove `dotenvy`
Opened this issue · 0 comments
emanguy commented
Rather than relying solely on environment variables as a method of configuring the REST app, we could make use of the config crate to maintain local configuration, then use environment variables in production. This will provide support for local configuration in a variety of file formats and force specific config options to be specific types.
Here's what needs to be done:
- Add the
config
crate to the project - Add a sample configuration which uses a local TOML file and pulls from the environment
- Add the parsed config to the app state
- Use config option(s) in one or more endpoints
- Update
doc/Configuration.md
to reflect the new config crate - Remove the
.env
file anddotenvy
from the project