use envconfig::Envconfig; use lazy_static::lazy_static; #[derive(Envconfig, Debug)] pub struct Config { #[envconfig(from = "BACKEND_BIND_URL")] pub bind_url: String, #[envconfig(from = "BACKEND_DB_URL")] pub db_url: String, #[envconfig(from = "BACKEND_REDIS_URL")] pub redis_url: String, #[envconfig(from = "BACKEND_CACHE_POST_CONTENT_TTL")] pub cache_post_content_ttl: usize, } lazy_static! { pub static ref CONFIG: Config = Config::init_from_env().unwrap(); }