Quick start
xymj-colyseus-server is an opinionated Colyseus server in TypeScript + Express: JWT, matchmaker rooms, frame-sync game rooms, chat rooms, and related conventions ship together. Below is the shortest path to run it locally; use the sidebar for deeper topics.
1. Clone & install
In the xymj-colyseus-server repository root:
npm installSee Installation for Node / MySQL / Redis requirements.
2. Configure & run
Copy and edit .env.development (MySQL, Redis — needed for matchmaking / chat queues — JWT_SECRET, etc.), then:
npm run devDefault http://localhost:2567 (port from PORT).
3. Verify HTTP & static pages
| Goal | URL |
|---|---|
| Swagger | http://localhost:2567/api-docs |
| Static intro | http://localhost:2567/ |
Use Swagger or your login API to obtain a token; Colyseus join / joinOrCreate options must carry it (see JWT & room authentication — full text in Chinese until translated).
4. Try matchmaking in the browser
Open http://localhost:2567/MatchmakingDemo.html, set the server URL and JWT, open multiple tabs to exercise match:find → match:found → join game_room. Parameters and scaling rules: Multi-scale matchmaking (stub → links to Chinese).
5. Where to go next
| Goal | Doc |
|---|---|
| Environment variables | Configuration |
| Room names & layout | Project structure |
| Match / Party message names | Matchmaking, Protocol |
| Unity / Cocos / Godot | Engine overview |
| Scenario pickers | Scenarios overview |
Chinese mirror
Most deep-dive pages are still Simplified Chinese only. Each English stub links to the matching 中文 page at the same path without /en/.