diff --git a/src/config.rs b/src/config.rs index a25b5a1..007a0c7 100644 --- a/src/config.rs +++ b/src/config.rs @@ -250,7 +250,10 @@ pub fn load(path: &str) -> Result { } pub static CONFIG: LazyLock = LazyLock::new(|| { - match load("config.json") { + let config_path = var("CONFIG"); + let config_path = config_path.as_deref().unwrap_or("config.json"); + + match load(config_path) { Ok(config) => config, Err(err) => { // Avoid panicking @@ -266,9 +269,12 @@ pub async fn watch_config_changes(reload_handle: reload::Handle(reload_handle: reload::Handle