mirror of
https://github.com/moghtech/komodo.git
synced 2026-09-06 00:00:44 +00:00
env override config port
This commit is contained in:
@@ -45,7 +45,11 @@ pub struct State {
|
||||
impl State {
|
||||
pub async fn load() -> anyhow::Result<Arc<State>> {
|
||||
let env = Env::load()?;
|
||||
let config = CoreConfig::load(&env.config_path);
|
||||
let mut config = CoreConfig::load(&env.config_path);
|
||||
|
||||
if let Some(port) = env.port {
|
||||
config.port = port;
|
||||
}
|
||||
|
||||
logger::init(config.log_level.into())?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user