We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 06a7f50 commit 5a4353cCopy full SHA for 5a4353c
1 file changed
crates/web-ui/src/main.rs
@@ -7,7 +7,7 @@ use axum::{
7
routing::{get, post},
8
Router,
9
};
10
-use tower_http::cors::CorsLayer;
+use tower_http::{cors::CorsLayer, services::ServeDir};
11
use tracing_subscriber;
12
13
mod api;
@@ -20,11 +20,11 @@ async fn main() -> Result<()> {
20
tracing_subscriber::fmt::init();
21
22
let app = Router::new()
23
- .route("/", get(handlers::root))
24
.route("/api/health", get(handlers::health))
25
.route("/api/compare", post(handlers::compare))
26
.route("/api/analyze", post(handlers::analyze))
27
.route("/api/configure", post(handlers::configure))
+ .nest_service("/", ServeDir::new("static").fallback(handlers::spa_fallback))
28
.layer(CorsLayer::permissive());
29
30
let listener = tokio::net::TcpListener::bind("0.0.0.0:3000").await?;
0 commit comments