fix(api): use server.listen instead of app.listen for WebSocket support

- server.ts: switch from app.listen() to server.listen() so WebSocket
  upgrade handler is on the same server as HTTP requests
- lobbyService: add host as first player on lobby creation
- ws-client: guard against reconnect when already connecting
- ws-provider: skip connect if already connected
This commit is contained in:
lila 2026-04-18 21:57:58 +02:00
parent 974646ebfb
commit 540155788a
4 changed files with 14 additions and 2 deletions

View file

@ -9,6 +9,6 @@ const server = createServer(app);
setupWebSocket(server);
app.listen(PORT, () => {
server.listen(PORT, () => {
console.log(`Server listening on port ${PORT}`);
});