Стартовый проект с роутерами
This commit is contained in:
0
backend-app/api/__init__.py
Normal file
0
backend-app/api/__init__.py
Normal file
7
backend-app/api/another_router.py
Normal file
7
backend-app/api/another_router.py
Normal file
@ -0,0 +1,7 @@
|
||||
from fastapi import APIRouter
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
@router.get("/hello")
|
||||
async def say_world():
|
||||
return {"msg":"Hello WORLD!"}
|
7
backend-app/api/main_router.py
Normal file
7
backend-app/api/main_router.py
Normal file
@ -0,0 +1,7 @@
|
||||
from fastapi import APIRouter
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
@router.get("/hello")
|
||||
async def say_hello():
|
||||
return {"msg":"hello"}
|
Reference in New Issue
Block a user