File tree Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,8 @@ All the parameters above can be set through environment variables.
2323The name of the environment variable is the same as the name of the configuration variable,
2424but in uppercase.
2525
26+ The environment variable name can optionally be prefixed with ` SQLPAGE_ ` .
27+
2628### Example
2729
2830``` bash
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ pub fn load() -> anyhow::Result<AppConfig> {
3434 . set_default ( "listen_on" , "0.0.0.0:8080" ) ?
3535 . add_source ( config:: File :: with_name ( "sqlpage/sqlpage" ) . required ( false ) )
3636 . add_source ( env_config ( ) )
37+ . add_source ( env_config ( ) . prefix ( "SQLPAGE_" ) )
3738 . build ( ) ?
3839 . try_deserialize :: < AppConfig > ( )
3940 . with_context ( || "Unable to load configuration" ) ?;
You can’t perform that action at this time.
0 commit comments