This is a showcase of using 2 servers.
- UI Server
- Using socketio to connect to clients
- Allows full-duplex communcation
- Allows broadcast and single messaging in real time
- Game Logic Server
- Using Flask to implement the REST API server
- Clone it
- Open 3-4 terminals
cd game-logic-server
>flask run
(make sure you pip install flask alr)cd ui-server
>npm install
>node index.js
(make sure you have node installed, with v16.19.0+)cd client
>npm install
>npm start
ornpm start --port [port number]
- Client
- /src/App.js - This is where how the page looks like and dynamic re-render when the numbers has been updated
- UI Server
- index.js - This is where I create a server using socketio with the express framework
- Game Logic Server
- app.py - This is where the flask server and route & functions for getting resources