serve static files again

This commit is contained in:
2025-08-02 16:52:10 +02:00
parent bedfabff9f
commit 3f61f675e9
2 changed files with 5 additions and 6 deletions

View File

@@ -24,11 +24,10 @@ fn client_id(cookies: CookieJar) -> (CookieJar, String) {
#[tokio::main]
async fn main() {
// build our application with a single route
let app = Router::new()
.route("/", get(index::index))
.merge(game::routes())
.fallback_service(ServeDir::new("./static/serve"));
.nest_service("/static", ServeDir::new("./static/serve"))
.merge(game::routes());
// run our app with hyper, listening globally on port 3000
let listener = tokio::net::TcpListener::bind("0.0.0.0:3000").await.unwrap();