Dev server automaticaly restarts and functional tests are green

This commit is contained in:
Colin Goutte 2023-08-25 10:34:36 +02:00
parent fd3f14a7b8
commit 4462b7c6fb
3 changed files with 15 additions and 2 deletions

View File

@ -9,7 +9,7 @@ install_dev:
make requirements
run_dev:
pipenv run python dev.py
git ls-files | entr -r pipenv run python dev.py
tdd:
# nomerge git ls-files | entr pipenv run pytest --lf --nf

View File

@ -4,6 +4,8 @@ verify_ssl = true
name = "pypi"
[packages]
fastapi = "*"
uvicorn = "*"
[dev-packages]
pytest = "*"

13
dev.py
View File

@ -1,2 +1,13 @@
from fastapi import FastAPI
import uvicorn
app = FastAPI()
@app.get("/")
async def root():
return {"message": "Hello World"}
if __name__ == "__main__":
print("dev.py file ok")
uvicorn.run(app, host="127.0.0.1", port=5000)