Skip to content

Latest commit

 

History

History

backend

ChatJustus Backend

Development Setup

We use conda for python version and virtual environment. On top of that, for dependency management, we use poetry.

Environment Setup

Ensure you have conda and poetry installed.

  1. Clone the repository and cd into this directory
cd backend
  1. Create the conda environment
conda env create -f environment.yaml
  1. Whenever working on the project, activate the environment
conda activate tc
  1. To install all dependencies, use poetry
poetry install
  1. Whenever adding a new dependency, instead of pip install, use poetry add:
poetry add <package>
  1. Whenever updating to the latest dependencies, use poetry update:
poetry update

Finally, we also need to setup the .env file. Find the .env.example file and copy it to .env. Then, fill in the values for the environment variables. You can go to our discord under PROTOTYPE > #important to find the values for the environment variables.

Running the server

Running in locally in your browser:

poetry run server

Running it exposed to your local network:

poetry run expose

This will open a QR code you can scan with your phone to use the app.