Frontend is static and can be deployed to GitHub Pages.
Multiplayer rooms run on a separate WebSocket server.
- Install deps:
npm install
- Start multiplayer server:
npm run mp:server
- Start static game:
npm run serve
- Open:
http://127.0.0.1:4173
- Start both containers:
docker compose up --build
- Open:
http://127.0.0.1:4173
- Multiplayer server URL in game menu:
ws://127.0.0.1:8787/ws
The workflow file is:
.github/workflows/deploy-pages.yml
Steps:
- Push to
main. - In GitHub repo settings, enable Pages and set source to
GitHub Actions. - The action deploys
index.html,styles,src,assets,admin.
This repo includes:
Dockerfilerender.yaml
One-click button template:
After deploy, the game can use the default public server URL in config, or you can override in Advanced:
wss://<your-render-service>.onrender.com/ws
Important:
- If frontend is HTTPS (GitHub Pages), multiplayer must use
wss://(notws://).
- Host enters room code, picks laps, clicks
Host Online Room. - Host clicks
Copy Invite Linkand sends it to friends. - Joiners open invite link and click
Join Online Room. - Advanced server override is optional (hidden under
Advanced).
Visual debug panel is hidden by default.
To show it, append query param:
?debug=1