/makers-api

Project built and deployed in 5 days for the Makers Fellowship application

Primary LanguagePython

Makers project in 5 days

A simple API built using Django REST and deployed on Heroku, using a bucket (AWS S3) to store the images and a PostgreSQL database to store the data.

Initialization

Create a virtual environment

python3 -m venv venv-api
source venv-api/bin/activate

Install requirements.txt

pip install -r requirements.txt

Create superuser

python manage.py createsuperuser

Add PostgreSQL db

Then, create an .env file and add the following to connect your local database

LOCAL_DB_NAME=db-name
LOCAL_DB_USER=
LOCAL_DB_PASSWORD=
LOCAL_DB_HOST=127.0.0.1
LOCAL_DB_PORT=5432

Migrate models

python manage.py makemigrations
python manage.py migrate

Run

python manage.py runserver