Using .env config

This commit is contained in:
2025-10-31 15:45:20 +01:00
parent 178adf8bf5
commit 7ed85f30dc
3 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ use voxa_server::{ServerConfig, utils::vfs};
fn main() -> voxa_server::Result<()> {
let root = PathBuf::from("");
let config: ServerConfig = if let Ok(env_config) = en::var("VX_CONFIG") {
let config: ServerConfig = if let Ok(env_config) = std::env::var("VX_CONFIG") {
ServerConfig::from_str(&env_config)?
} else {
vfs::read_config(&root.join("config.json"))?