added debug

This commit is contained in:
2025-08-29 11:35:43 +02:00
parent dea95d4a43
commit 523cbb9e2f

View File

@@ -11,12 +11,15 @@ pub struct AppConfig {
impl AppConfig {
pub fn from_env() -> Result<Self, config::ConfigError> {
// Load .env file (works in both Docker and local development)
println!("Loading .env file...");
dotenvy::dotenv().ok();
let cfg = Config::builder()
.add_source(config::Environment::with_prefix("WATCHER").separator("_"))
.build()?;
println!("Configuration loaded: {cfg:#?}");
cfg.try_deserialize()
}
}