From 6767f55640178f4bbe5b4be0637904b560f3d015 Mon Sep 17 00:00:00 2001 From: M1n-0 Date: Tue, 31 Mar 2026 14:17:27 +0200 Subject: [PATCH] fix error load html (backend) --- backend/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/main.rs b/backend/src/main.rs index fc83b9a..ecbe594 100644 --- a/backend/src/main.rs +++ b/backend/src/main.rs @@ -9,7 +9,7 @@ use tower_http::services::ServeDir; async fn main() { let app = Router::new() .route("/", get(handler)) - .nest_service("/assets", ServeDir::new("../web/assets")); + .nest_service("../web/assets", ServeDir::new("../web/assets")); let addr = SocketAddr::from(([0, 0, 0, 0], 3500)); println!("listening on {}", addr); @@ -20,7 +20,7 @@ async fn main() { } async fn handler() -> Html { - let html_content = read_html_from_file("/web/templates/view/index.html") + let html_content = read_html_from_file("../web/templates/view/index.html") .await .unwrap_or_else(|_| "

Error loading HTML file

".to_string()); Html(html_content)