May 2019
🔨 Group work to learn how to use node.js (server-side) and websockets (Socket IO). See demo on Heroku
The goal of this exercise was to learn socket IO and real-time, bidirectional and event-based communication between the browser and the server.
According the rules of the exercise the server-side technologies were mandatory. The ones for the front-end part were free.
- Node.JS (server-side)
- Websockets/Socket IO (server-side)
- React JS (client-side)
You will need node.js and npm installed on your computer.
To play localy
In servers.js (root) replace
endpoint: undefined, //Heroku
by:
endpoint: "localhost:8000", //Local
- Use
node server.js
in the root to launch the server - Use
npm start
in the directory socket-client
To build the app for Heroku:
You will need this command line in package.json:
"build": "cd socket-client && npm install && npm run build"
In the root:
npm install
to install dependenciesnpm run build
to build for production
- Insert your name then create or join a room
- ...
- Play!
See the rules of Rock, Paper, Scissors, Lizard, Spock explained by Sheldon Cooper.
Sprites sheets and sound effects are the property of Capcom and are used for demonstration purpose only