added debug
This commit is contained in:
@@ -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()
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user