diff --git a/src/infra/tcp_server.rs b/src/infra/tcp_server.rs index f84d135..5d8861b 100644 --- a/src/infra/tcp_server.rs +++ b/src/infra/tcp_server.rs @@ -192,7 +192,9 @@ where .configure(api_config::), ) // Serve the /pkg path with the compiled WASM app. - .service(Files::new("/pkg", "./app/pkg")); + .service(Files::new("/pkg", "./app/pkg")) + // Default to serve index.html for unknown routes, to support routing. + .service(web::scope("/").route("/.*", web::get().to(index))); } struct AppState