by: Group 11
Ahmed Darwish (100754743)
Armaghan Nasir (100820948)
Tahmid Chowdhury (100822671)
Jason Manarroo (100825106)
^^ Click Image, or Raw Link: https://youtu.be/i_CnzXaYXig
^^ Click Image, or Raw Link: https://youtu.be/wY-Z2K8M_Ns
Linux Setup:
Docker DB Setup
docker run --name blackjack-db -e MYSQL_ROOT_PASSWORD=blackjack -d -p 3306:3306 mysql:latest
CREATE DATABASE blackjack_replay;
Now go to scripts.md document, within the same directory as this file, and run Script #1 to initialize the Table Schemas, and run Script #2 to load in the card_registry
table with 52 cards, for cloning and shuffling upon active_games
initializations.
Anaconda Install, which is a Python Distribution and Package Management Tool (Easier for those on Windows IMO)
-
conda create --name blackjack-API
-
conda activate blackjack-API
-
conda install fastapi uvicorn mysql-connector-python
When you want to close the VENV
- Use
conda deactivate
to de-activate Conda VENV
-
Make sure you are in
./API
directory -
python3 -m venv blackjack-VENV
- LINUX:
source blackjack-VENV/bin/activate
- WINDOWS:
& .\blackjack-VENV\Scripts\Activate.ps1
(Untested)
-
pip install fastapi uvicorn mysql-connector-python
-
Make sure essential API packages are installed LINUX ONLY:
pip list | grep -E "uvicorn|fastapi|mysql-connector-python"
When you want to close the VENV
- Use
deactivate
to de-activate PIP VENV
Running API, this will require:
- Start MySQL Docker Container
sudo docker start blackjack-db
- Re-activate your virtual environment, then going to
../API/source
wheremain.py
resides, then run:uvicorn main:app --reload
On Linux: you're able to run the shell script run_api.sh
in the main Blackjack3700U Directory, this will activate venv, start up the docker, and run api, just run the it with BASH!
Create-React-App command
sudo npm install -g create-react-app
Setting up, and running our frontend in Development Mode
cd Frontend/blackjack-web/src
npm install
npm run start