From 309c8bc5308c8f58d67a6cc9b60de377a614f139 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Tue, 9 Mar 2021 21:04:07 +0100 Subject: feat: add server configuration by .env --- src/config.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/config.rs') diff --git a/src/config.rs b/src/config.rs index f10fd08..7146a0b 100644 --- a/src/config.rs +++ b/src/config.rs @@ -1,8 +1,15 @@ 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, } -- cgit v1.2.3-18-g5258