752 B
752 B
FastAPI Backend
Initial setup
cd backend_fastapi
# add pipenv to PATH
export PATH=$PATH:/home/${USER}/.local/bin
pipenv install --skip-lock
Before first run
# Creates db (lessons_learned.db) in backend_fastapi
# Loads initial data (superuser and 3 sample lessons learned)
./pre-start.sh
Run
cd backend_fastapi
./run
Run the tests
- Copy app db to tests dir
- cd into test dir
- Both of the above are done by sourcing this script:
. ./pre-tests.sh
- Run tests in the test directory
./run.sh
# or if you want to see
# the print statement outputs
./run.sh -s
Browse the API in awe!
- http://0.0.0.0:8001/docs - API docs
- http://0.0.0.0:8001 - see all lessons