lessons_learned/backend_fastapi
cst 3a78a71709 move fastapi backend to separate dir 2022-06-12 09:04:15 +03:00
..
alembic move fastapi backend to separate dir 2022-06-12 09:04:15 +03:00
app move fastapi backend to separate dir 2022-06-12 09:04:15 +03:00
devops move fastapi backend to separate dir 2022-06-12 09:04:15 +03:00
Pipfile move fastapi backend to separate dir 2022-06-12 09:04:15 +03:00
Pipfile.lock move fastapi backend to separate dir 2022-06-12 09:04:15 +03:00
README.md move fastapi backend to separate dir 2022-06-12 09:04:15 +03:00
alembic.ini move fastapi backend to separate dir 2022-06-12 09:04:15 +03:00
kill_server move fastapi backend to separate dir 2022-06-12 09:04:15 +03:00
log.txt move fastapi backend to separate dir 2022-06-12 09:04:15 +03:00
pre-start.sh move fastapi backend to separate dir 2022-06-12 09:04:15 +03:00
pre-tests.sh move fastapi backend to separate dir 2022-06-12 09:04:15 +03:00
run move fastapi backend to separate dir 2022-06-12 09:04:15 +03:00
setup.py move fastapi backend to separate dir 2022-06-12 09:04:15 +03:00

README.md

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!