add possibility to configure dotenv path for db and bot
Rust / Run tests (pull_request) Failing after 1m9s Details

This commit is contained in:
DataHearth 2023-08-09 17:28:51 +02:00
parent f777646394
commit 4fd406a10f
No known key found for this signature in database
GPG Key ID: E88FD356ACC5F3C4
2 changed files with 2 additions and 2 deletions

View File

@ -8,7 +8,7 @@ use reqwest::Client;
#[tokio::main]
async fn main() {
match dotenvy::dotenv() {
match dotenvy::from_path(std::env::var("DOTENV_PATH").unwrap_or_else(|_| "/.env".to_string())) {
Ok(_) => {}
Err(e) => {
println!("Failed to load .env file: {}", e);

View File

@ -40,7 +40,7 @@ static CONTEXT: OnceLock<DB> = OnceLock::new();
#[actix_web::main]
async fn main() -> io::Result<()> {
match dotenvy::dotenv() {
match dotenvy::from_path(std::env::var("DOTENV_PATH").unwrap_or_else(|_| "/.env".to_string())) {
Ok(_) => {}
Err(e) => {
println!("Failed to load .env file: {}", e);