Skip to content

Commit

Permalink
Merge branch 'main' of github.com:nramos0/fluent-reader
Browse files Browse the repository at this point in the history
  • Loading branch information
nramos0 committed Oct 22, 2022
2 parents 195aa42 + ba753d1 commit e2bbfe8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions backend/src/app_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ pub struct AppConfig {

impl AppConfig {
pub fn from_env() -> Result<Self, ConfigError> {
let mut cfg = config::Config::new();
cfg.merge(config::Environment::new())?;
cfg.try_into()
config::Config::builder()
.add_source(config::File::new(".env", config::FileFormat::Ini))
.build()
.and_then(|config| config.try_deserialize())
}
}

0 comments on commit e2bbfe8

Please sign in to comment.