Skip to content

Latest commit

 

History

History
47 lines (33 loc) · 1.03 KB

README.md

File metadata and controls

47 lines (33 loc) · 1.03 KB

Prisma FastApi

CI

Blog post

Setup virtual environment

python -m venv .venv
source .venv/bin/activate

Install requirements

pip install -r requirements.txt

Setup environment

  1. cp .env.sample .env
  2. Include DATABASE_URL
    DATABASE_URL="postgresql://<user>:<password>@<url>:5432/postgres?schema=<scheme>"
    

    Note that you should change appropriate values in user, password, url, scheme fields. Or you can even use other database. More about connection urls

Generate Prisma Client and Nexus

prisma generate

Start server

uvicorn main:app --reload

Notes

After installing packages

pip freeze > requirements.txt