Add WIP websocket to controller and refactor settings

This commit is contained in:
Tobias Reisinger 2023-11-23 16:00:24 +01:00
parent 452454f9e8
commit 32c75ad73a
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
11 changed files with 128 additions and 37 deletions
emgauwa-core/src

View file

@ -1,5 +1,4 @@
use config::Config;
use emgauwa_lib::constants;
use emgauwa_lib::{constants, utils};
use serde_derive::Deserialize;
#[derive(Clone, Debug, Deserialize)]
@ -41,15 +40,5 @@ impl Default for Logging {
}
pub fn init() -> Settings {
Config::builder()
.add_source(config::File::with_name("emgauwa-core"))
.add_source(
config::Environment::with_prefix("EMGAUWA_CORE")
.prefix_separator("__")
.separator("__"),
)
.build()
.unwrap()
.try_deserialize::<Settings>()
.expect("Error reading settings.")
utils::load_settings("core", "CORE")
}