Skip to content

Commit 5a4353c

Browse files
committed
Check pt fixing bugs
1 parent 06a7f50 commit 5a4353c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/web-ui/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use axum::{
77
routing::{get, post},
88
Router,
99
};
10-
use tower_http::cors::CorsLayer;
10+
use tower_http::{cors::CorsLayer, services::ServeDir};
1111
use tracing_subscriber;
1212

1313
mod api;
@@ -20,11 +20,11 @@ async fn main() -> Result<()> {
2020
tracing_subscriber::fmt::init();
2121

2222
let app = Router::new()
23-
.route("/", get(handlers::root))
2423
.route("/api/health", get(handlers::health))
2524
.route("/api/compare", post(handlers::compare))
2625
.route("/api/analyze", post(handlers::analyze))
2726
.route("/api/configure", post(handlers::configure))
27+
.nest_service("/", ServeDir::new("static").fallback(handlers::spa_fallback))
2828
.layer(CorsLayer::permissive());
2929

3030
let listener = tokio::net::TcpListener::bind("0.0.0.0:3000").await?;

0 commit comments

Comments
 (0)