use std::sync::LazyLock;
pub static DATABASE_URL: LazyLock<String> = LazyLock::new(|| {
dotenv::dotenv().ok();
std::env::var("DATABASE_URI").unwrap()
});
pub static SECRET_KEY: LazyLock<String> = LazyLock::new(|| {
dotenv::dotenv().ok();
std::env::var("SUPER_SECRET_KEY").unwrap()
});
I wrote this code in my lib.rs file. While I am trying to debug this variable its showing uninit
Also how to do this with only one dotenv::dotenv().ok()