Load configuration in server main
Some checks failed
Push Workflows / rustfmt (push) Failing after 5s
Push Workflows / tailwind-build (push) Successful in 5s
Push Workflows / test (push) Failing after 18s
Push Workflows / docs (push) Successful in 19s
Push Workflows / clippy (push) Failing after 15s
Push Workflows / build (push) Failing after 41s
Push Workflows / nix-build (push) Has been cancelled

This commit is contained in:
2026-06-23 21:29:13 -04:00
parent 5cbfa6ac9e
commit 353288bc05

View File

@@ -1,11 +1,17 @@
use crate::App; use crate::App;
use crate::util::error::Error; use crate::util::error::Error;
use crate::server::config;
pub fn main() -> Result<()> { pub fn main() -> Result<()> {
if let Err(e) = dotenvy::dotenv() { if let Err(e) = dotenvy::dotenv() {
tracing::warn!("Error reading .env: {e}"); tracing::warn!("Error reading .env: {e}");
} }
tracing::debug!("Loading configuration...");
let config = config::load_config()
.map_err(|e| Error::message_here(e.to_string()))
.err_context("Failed to load config")?;
tracing::info!("Setup complete, launching web server..."); tracing::info!("Setup complete, launching web server...");
dioxus::launch(App); dioxus::launch(App);