blog/backend/src/config.rs

14 lines
262 B
Rust
Raw Normal View History

2023-02-07 06:02:51 +00:00
use envconfig::Envconfig;
use lazy_static::lazy_static;
#[derive(Envconfig, Debug)]
pub struct Config {
#[envconfig(from = "BACKEND_DB_URL")]
pub db_url: String,
}
lazy_static! {
pub static ref CONFIG: Config = Config::init_from_env().unwrap();
}