Skip to content

Commit

Permalink
Complete first video in playlist
Browse files Browse the repository at this point in the history
We coded along the [Installation/API Routes/Swagger Docs video](https://youtu.be/Lw-zLopB3o0?si=I6AaS1jCxhnR-QGb), did notice that this is basically a video form of the [Quick Start tutorial at FastAPI](https://fastapi.tiangolo.com), but we added comments in the `main.py` file to help be aware of how to activate the app.

We also updated the Poetry environment to get FastAPI working. Needed uvicorn as well
  • Loading branch information
AaronWChen committed Aug 1, 2024
1 parent 504db69 commit 126ce4f
Show file tree
Hide file tree
Showing 3 changed files with 512 additions and 92 deletions.
16 changes: 16 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
from fastapi import FastAPI

# use localhost:{port} in browser
# use localhost:{port}/docs to look at the interactive, automatically created documentation

app = FastAPI()


@app.get("/")
async def index() -> dict[str, str]:
return {"hello": "world"}


@app.get("/about")
async def about() -> str:
return "About MeaLeon"
Loading

0 comments on commit 126ce4f

Please sign in to comment.