Make dotenv file optional
This commit is contained in:
parent
c194daa42c
commit
28d5fd71fb
1 changed files with 1 additions and 1 deletions
|
|
@ -53,7 +53,7 @@ pub struct Config {
|
|||
|
||||
impl Config {
|
||||
pub fn from_env() -> Result<Self, Box<dyn Error>> {
|
||||
dotenvy::dotenv()?;
|
||||
dotenvy::dotenv().ok();
|
||||
|
||||
let redis_url = std::env::var("REDIS_URL").unwrap_or("redis://127.0.0.1/".to_string());
|
||||
let redis_cache_time: i64 = std::env::var("REDIS_CACHE_TIME")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue