Add WIP websocket to controller and refactor settings
This commit is contained in:
parent
452454f9e8
commit
32c75ad73a
11 changed files with 128 additions and 37 deletions
emgauwa-core/src
|
@ -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")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue