diff options
author | Santo Cariotti <santo@dcariotti.me> | 2021-03-09 21:05:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-09 21:05:47 +0100 |
commit | ed24f917ffabfead27d8b5899e29b55eff2810cc (patch) | |
tree | afd8008c851add0a19ad3201d4019b41358da9b3 /src/config.rs | |
parent | 21ec8d86f701f1a261fa2c3892034c7763a950b6 (diff) | |
parent | 309c8bc5308c8f58d67a6cc9b60de377a614f139 (diff) |
Merge pull request #4 from gico-net/feat/conf-host-port
Add Server configuration by environment file
Diffstat (limited to 'src/config.rs')
-rw-r--r-- | src/config.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs index f10fd08..7146a0b 100644 --- a/src/config.rs +++ b/src/config.rs @@ -2,7 +2,14 @@ pub use config::ConfigError; use serde::Deserialize; #[derive(Deserialize)] +pub struct ServerConfig { + pub host: String, + pub port: u16, +} + +#[derive(Deserialize)] pub struct Config { + pub server: ServerConfig, pub pg: deadpool_postgres::Config, } |