A tug-o-war game with Remix, WebSockets, and MSW. Help the stubborn dwarves settle one of the most important questions of humankind: Tabs or Spaces? And, well, learn about the WebSocket mocking with MSW while you're at it!
If you are reading this after EpicWeb Conf 2024, launch the game in Admin mode and click "Start game" in order to play.
/serverfor the production WebSocket server and the game logic./app/mocks/handlers.tsfor the WebSocket event handlers with MSW./app/components/tug-o-war.test.tsxfor integration tests with Vitest and MSW. Note that the integration tests run in a special environment (/test/environments/vitest-environment-node-websocketthat exposes theWebSocketconstructor globally in Node.js)./app/entry.client.tsxfor browser integration of MSW.
npm install
npm run devFor build and preview:
npm run build
npm start