diff --git a/Makefile b/Makefile index 09bcf5a..669b781 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/Pipfile b/Pipfile index bbcf66c..a630cd6 100644 --- a/Pipfile +++ b/Pipfile @@ -4,6 +4,8 @@ verify_ssl = true name = "pypi" [packages] +fastapi = "*" +uvicorn = "*" [dev-packages] pytest = "*" diff --git a/dev.py b/dev.py index 894eaff..0ce2447 100644 --- a/dev.py +++ b/dev.py @@ -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)