SHAREHUB BACKEND

SET UP GUIDE

1. Clone the Repo:

git clone https://github.com/Karume-lab/ShareHub-BE

2. Create a Virtual Environment:

python -m venv venv

3. Activate Virtual Environment:

- Linux:

source ./venv/bin/activate

- Windows:

venv\Scripts\activate

4. Install Python Packages:

pip install -r requirements.txt

5. Create .env from .env.example:

  • Need help creating the file? Watch this video for guidance: How to Create an App Password
  • Fill in the Gmail account and app password in the first two fields.
  • Set the third field to True.

6. Make Migrations:

python manage.py makemigrations && python manage.py migrate

7. Run the Server:

python manage.py runserver

8. API Documentation:

Navigate to either of these URLs:

UPDATING YOUR CLONE

1. Pulling remote changes:

Go to your local repository and make sure you are on the main branch, then run:

git pull

2. Activate Virtual Environment:

- Linux:

source ./venv/bin/activate

- Windows:

venv\Scripts\activate

3. Install new Packages:

pip install -r requirements.txt

4. Make Migrations:

python manage.py makemigrations && python manage.py migrate

5. Run the Server:

python manage.py runserver