mirror of
https://github.com/NetworkCats/rustyip.git
synced 2026-11-13 16:17:46 +00:00
feat: load .env file at startup via dotenvy
This commit is contained in:
Generated
+7
@@ -271,6 +271,12 @@ dependencies = [
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dotenvy"
|
||||
version = "0.15.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b"
|
||||
|
||||
[[package]]
|
||||
name = "dunce"
|
||||
version = "1.0.5"
|
||||
@@ -1090,6 +1096,7 @@ dependencies = [
|
||||
"arc-swap",
|
||||
"askama",
|
||||
"axum",
|
||||
"dotenvy",
|
||||
"http-body-util",
|
||||
"maxminddb",
|
||||
"reqwest",
|
||||
|
||||
@@ -14,6 +14,7 @@ arc-swap = "1"
|
||||
reqwest = { version = "0.13", default-features = false, features = ["rustls"] }
|
||||
tracing = "0.1"
|
||||
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
||||
dotenvy = "0.15"
|
||||
static-files = "0.3.1"
|
||||
|
||||
[build-dependencies]
|
||||
|
||||
@@ -7,6 +7,8 @@ use rustyip::{config, db, handlers, routes, updater};
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
dotenvy::dotenv().ok();
|
||||
|
||||
tracing_subscriber::fmt()
|
||||
.with_env_filter(
|
||||
EnvFilter::try_from_default_env().unwrap_or_else(|_| EnvFilter::new("error")),
|
||||
|
||||
Reference in New Issue
Block a user