Drexel Software Studio
game emulation of a board game Kot.
Backend documentation see \kot\backend\README.md.
Frontend documentation see \kot\frontend\README.md.
-
Production: React website hosted via Django server.
- Build React:
npm build
copies static content to frontend/build/static. - Run Python
python manage.py runserver
to host static content via django server.
- Build React:
-
Development:
- Run React:
npm start
to run development server. - Run Python
python manage.py runserver
to run python development server.
- Run React:
- Node.Js React Server: http://localhost:3000/
- Django Server: http://localhost:8000/
- Django DB Access: http://localhost:8000/admin/
Do this once after first cloning KOT...
- Install NPM dependencies then build production React build
>cd \kot\frontend\
>npm install
>npm build
-
Option 1: Use Setup Python Virtual Environment (recommended)
>cd \kot\
>python -m venv env
>.\env\Scripts\activate
>pip install -r requirements.txt
>python -m pip install --upgrade pip
>cd \kot\backend\
>python manage.py runserver
-
Option 2: Use Pythons Global Enviornment
>cd \kot\backend\
>pip install -r requirements.txt
NOTE: PIP or other prompts may suggest upgrading, please do so.
-
Setup React >
cd \kot\frontend\
>npm install
-
Running Python Server >
python manage.py runserver
Runs the app in the development mode.<br /> Open a browser, go to [http://localhost:8000/](http://localhost:8000/) to view python root.
-
Running React Server >
npm start
Runs the app in the development mode.<br /> Open [http://localhost:3000](http://localhost:3000) to view it in the browser. The page will reload if you make edits.<br /> You will also see any lint errors in the console.
-
Testing Python >
pytest
-
Testing React >
cd \kot\frontend\
>npm test
Launches the test runner in the interactive watch mode.
See the section about running tests for more information. -
Testing React w/ Coverage details >
cd \kot\frontend\
>npm run coverage