add possibility to configure dotenv path for db and bot
Rust / Run tests (pull_request) Failing after 1m9s
Details
Rust / Run tests (pull_request) Failing after 1m9s
Details
This commit is contained in:
parent
f777646394
commit
4fd406a10f
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue