Add a better structure in the project

This commit is contained in:
2025-08-15 18:02:30 -04:00
parent 985443ca91
commit 611301dfda
10 changed files with 178 additions and 7 deletions

View File

@@ -7,7 +7,7 @@ use std::str::FromStr;
#[derive(Debug)]
pub struct Config {
pub bind_address: SocketAddr,
pub database_url: Option<String>,
// pub database_url: Option<String>,
}
impl Config {
@@ -24,11 +24,11 @@ impl Config {
return Err("In no-auth mode, BIND_ADDRESS must be 127.0.0.1".to_string());
}
let database_url = env::var("DATABASE_URL").ok();
// let database_url = env::var("DATABASE_URL").ok();
Ok(Self {
bind_address,
database_url,
// database_url,
})
}
}