mirror of
https://gitlab.com/famedly/conduit.git
synced 2024-11-15 09:48:18 -07:00
feat(config): split on __, allowing for setting individual values in a table
This commit is contained in:
parent
1f313c6807
commit
35ed731a46
@ -6,6 +6,8 @@
|
||||
|
||||
> **Note:** If you update the configuration file, you must restart Conduit for the changes to take effect
|
||||
|
||||
> **Note:** You can also configure Conduit by using `CONDUIT_{field_name}` environment variables. To set values inside a table, use `CONDUIT_{table_name}__{field_name}`. Example: `CONDUIT_SERVER_NAME="example.org"`
|
||||
|
||||
Conduit's configuration file is divided into the following sections:
|
||||
|
||||
- [Global](#global)
|
||||
|
@ -57,7 +57,7 @@ async fn main() {
|
||||
))
|
||||
.nested(),
|
||||
)
|
||||
.merge(Env::prefixed("CONDUIT_").global());
|
||||
.merge(Env::prefixed("CONDUIT_").global().split("__"));
|
||||
|
||||
let config = match raw_config.extract::<Config>() {
|
||||
Ok(s) => s,
|
||||
|
Loading…
Reference in New Issue
Block a user