Project that displays Rock Paper Scissors game results.
Here's link to a working demo of the project: https://floating-savannah-14330.herokuapp.com/
My take on Reaktor's assignment for 2022. The project displays current and historical Rock Paper Scissors games fetched from Reaktor's Bad-Api.
- Typescript for the backends
- postgreSQL for the database
- React with typescript for the frontend
- Docker and docker-compose for the containers
The project has been seperated to 3 different parts.
- Websocket backend
- History backend
- Frontend
Create .env file into historybackend folder and with the following:
DATABASE_URL= YOUR DB URL
DATABASE_ROW_LIMIT=10000 INCREASE THIS IF YOU DONT HAVE A ROW LIMIT.
Using Docker-compose
docker-compose up
Without Docker (Manual installation)
cd historybackend
npm i
cd ../kpsfrontti
npm i
cd ../websocketbackend
npm i
Using docker-compose is easily the most seamless way to go. However installing node modules for each folder is possible aswell.
To build the projects follow these steps:
npm run build && cp -r ./build ../historybackend/frontBuild
npm run tsc
npm run tsc
Command for frontend will build itself and copy the build folder to historybackend as folder named "frontendBuild".
Commands for backends above will create folders called 'build' to their folders.
Make sure you are in the root of the project while continuing.
NOTE: Do following steps in this order:
cd historybackend && npm start
Open a new terminal and make sure you are in the root of the project.
Websocket backend:
cd websocketbackend && npm start
- See ongoing Rock Paper Scissors games
- Able to look individual player game history.
- Ability to see statistic on individual players game history.