Skip to content

Commit

Permalink
chore: Update environment variable seperator comment to indicate doub…
Browse files Browse the repository at this point in the history
…le underscore (#164)

chore: Update env var comment to double underscore
  • Loading branch information
bgins authored Sep 5, 2023
1 parent 6a2cd35 commit 20c981f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rust/src.axum/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ impl Settings {
let path = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("config/settings.toml");
// inject environment variables naming them properly on the settings
// e.g. [database] url="foo"
// would be injected with environment variable APP_DATABASE_URL="foo"
// use one underscore as defined by the separator below
// would be injected with environment variable APP__DATABASE__URL="foo"
// using a double underscore as defined by the separator below
let s = Config::builder()
.add_source(File::with_name(&path.as_path().display().to_string()))
.add_source(Environment::with_prefix("APP").separator("__"))
Expand Down

0 comments on commit 20c981f

Please sign in to comment.