Load env variables from .env file

This commit is contained in:
2025-04-05 02:44:58 +02:00
parent c32c18ffc0
commit 72819faa8f
4 changed files with 12 additions and 0 deletions

View File

@@ -1,5 +1,6 @@
use std::{net::SocketAddr, path::Path};
use dotenvy::dotenv;
use hyper::server::conn::http1::{self};
use hyper_util::rt::TokioIo;
use rand::rngs::OsRng;
@@ -10,6 +11,8 @@ use tunnel_rs::ssh::Server;
#[tokio::main]
async fn main() {
dotenv().ok();
let env_filter = EnvFilter::try_from_default_env()
.or_else(|_| EnvFilter::try_new("info"))
.expect("Fallback should be valid");