A simple real-time multiplayer trivia skeleton:
- One device acts as the host display screen
- Players join from their phones
- Live lobby updates via WebSockets
- Client: Vite + React
- Server: Node.js + Express + Socket.IO
- State: in-memory (no database yet)
client/Vite React appserver/Express + Socket.IO server
- Node.js 18+ recommended
- npm (comes with Node)
Server:
cd server
npm installClient:
cd ../client
npm installTerminal A
cd server
npm run devTerminal B
cd client
npm run devAfter both the client and server are running:
Client (web app): http://localhost:5173
Server (API + WebSocket): http://localhost:3001