Skip to content

Commit cbc594a

Browse files
committed
API
1 parent 3878a81 commit cbc594a

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

ch04/todos/api.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
from fastapi import FastAPI
2+
from todo import todo_router
3+
4+
app = FastAPI()
5+
6+
7+
@app.get("/")
8+
async def welcome():
9+
return {
10+
"message": "Hello World"
11+
}
12+
13+
app.include_router(todo_router)

0 commit comments

Comments
 (0)