diff --git a/backend/task/src/config.rs b/backend/task/src/config.rs new file mode 100644 index 0000000..029adde --- /dev/null +++ b/backend/task/src/config.rs @@ -0,0 +1,11 @@ +use std::path::PathBuf; + +pub fn config() -> Configuration { + Configuration { + env: dotenvy::dotenv(), + } +} + +pub struct Configuration { + env: Result, +} diff --git a/backend/task/src/main.rs b/backend/task/src/main.rs index 0fa7fbd..0c43fdb 100644 --- a/backend/task/src/main.rs +++ b/backend/task/src/main.rs @@ -7,7 +7,7 @@ use std::time::Duration; use storage::services::aws; use tasks::*; -//mod config; +mod config; mod tasks; mod utils; @@ -52,7 +52,7 @@ pub struct TaskJob { async fn main() { println!("Hello, world!"); - dotenvy::dotenv().unwrap(); + let _ = config::config(); // setup database let database_url =