Local Development - Juules32/pokelink GitHub Wiki

Backend

  • Have a postgres database running.
  • Navigate to /backend
  • Copy .env.example to .env.development and fill in the values
  • Run the following commands:
pip install -r requirements.txt                       # Install dependencies
python -m data_generation.pokemon_data_generation     # Generate pokemon JSON data from pokeAPI
python -m data_generation.graph_data_generation       # Generate graph from pokemon data
python setup.py                                       # Generate tables and template puzzles on the DB
uvicorn main:app --reload --port 80                   # Run the webserver

File Server (Blob)

  • Having generated the graph_data.pkl file, host it, for example with python using: python -m http.server 12345 -d backend/data

Frontend

  • Navigate to /frontend
  • Copy .env.example to .env.development and fill in the values
  • Run the following copmmands:
npm i                                           # Install dependencies
npm run dev                                     # Run the webserver