feat: load config from env vars (#576)

Signed-off-by: Nico <nico.macioszek@gmail.com>
This commit is contained in:
Nico
2026-03-23 04:33:01 +01:00
committed by GitHub
parent 2547fc6cd3
commit 5191bd16b2

View File

@@ -1,7 +1,7 @@
use std::{collections::HashMap, path::Path}; use std::{collections::HashMap, path::Path};
use cached::proc_macro::cached; use cached::proc_macro::cached;
use config::{Config, File, FileFormat}; use config::{Config, Environment, File, FileFormat};
use futures_locks::RwLock; use futures_locks::RwLock;
use once_cell::sync::Lazy; use once_cell::sync::Lazy;
use serde::Deserialize; use serde::Deserialize;
@@ -109,6 +109,8 @@ static CONFIG_BUILDER: Lazy<RwLock<Config>> = Lazy::new(|| {
cwd = path.parent(); cwd = path.parent();
} }
builder = builder.add_source(Environment::with_prefix("REVOLT").separator("__"));
builder.build().unwrap() builder.build().unwrap()
}) })
}); });