feat(web): add landing page at / with links to play, leaderboard, replays
Build and Deploy / build-and-push (push) Failing after 1m37s

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
funman300
2026-05-13 16:21:38 -07:00
parent efe930af1e
commit 28b1d38951
2 changed files with 161 additions and 1 deletions
+6 -1
View File
@@ -201,6 +201,10 @@ fn build_router_inner(state: AppState, rate_limit: bool) -> Router {
// same regardless of `:id` — it reads the path from `location` in JS
// and fetches the replay JSON from `/api/replays/:id`.
let web = Router::new()
.route(
"/",
get(|| async { Html(include_str!("../web/home.html")) }),
)
.route(
"/replays/{id}",
get(|| async { Html(include_str!("../web/index.html")) }),
@@ -209,7 +213,8 @@ fn build_router_inner(state: AppState, rate_limit: bool) -> Router {
"/play",
get(|| async { Html(include_str!("../web/game.html")) }),
)
.nest_service("/web", ServeDir::new("solitaire_server/web"));
.nest_service("/web", ServeDir::new("solitaire_server/web"))
.nest_service("/assets", ServeDir::new("assets"));
Router::new()
.merge(protected)