feat(config): add database configuration layer with backend detection
Add AppConfig loaded from .env via dotenvy. DATABASE_URL prefix determines the backend (sqlite:// → SQLite, postgresql:// → PostgreSQL). ConfigError via thiserror gives clear messages on missing or unknown URLs. Server logs the chosen backend at startup. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
7
Cargo.lock
generated
7
Cargo.lock
generated
@@ -315,6 +315,12 @@ dependencies = [
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dotenvy"
|
||||
version = "0.15.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b"
|
||||
|
||||
[[package]]
|
||||
name = "drain_filter_polyfill"
|
||||
version = "0.1.3"
|
||||
@@ -1590,6 +1596,7 @@ version = "0.1.0"
|
||||
dependencies = [
|
||||
"axum",
|
||||
"console_error_panic_hook",
|
||||
"dotenvy",
|
||||
"leptos",
|
||||
"leptos_axum",
|
||||
"leptos_meta",
|
||||
|
||||
Reference in New Issue
Block a user