feat(web): add landing page at / with links to play, leaderboard, replays
Build and Deploy / build-and-push (push) Failing after 1m37s
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user