NiketanG / stone-paper-scissor-online

Online, 2-Player Stone-Paper-Scissor App

Home Page:https://stone-paper-scissor.fly.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Online 2 Player Stone-Paper-Scissor

Demo

How to use :

  1. Create a Game
  2. Ask the other player to join using the created Game ID.
  3. Play.

Features :

  • Unlimited games
  • Realtime updates using Sockets
  • Online counter shows the count of players that have Joined.
  • Winner/Tie status.

How to setup:

  1. Clone the repo.
  2. Install requirements for Frontend.
yarn
OR
npm install
  1. Install the requirements for Backend
cd api
pip install -r requirements.txt
  1. Set the Enviroment Variables.
SECRET_KEY=
DATABASE_URI=
  1. Create Database table

    Run this inside the api directory

python manage.py create_db

The application is configured to use Postgresql by default.

  1. Run the backend

    Run this inside the api directory

flask run
  1. Set the Enviroment Variables for Frontend.
API_URL
  1. Run the frontend server

    Run this in the web directory

yarn start
OR
npm run start

Production

  1. Build the frontend

    Run in web directory

yarn build
OR
npm run build
  1. Start the server.

    Run in api directory

flask run

About

Online, 2-Player Stone-Paper-Scissor App

https://stone-paper-scissor.fly.dev/


Languages

Language:TypeScript 64.9%Language:Python 30.0%Language:CSS 2.0%Language:Mako 1.3%Language:HTML 1.0%Language:JavaScript 0.6%Language:Procfile 0.3%