feat: 新增技能扩展N7一章相关示例源码
This commit is contained in:
18
code/newsletter/N7/templates/project/main.py.jinja2
Normal file
18
code/newsletter/N7/templates/project/main.py.jinja2
Normal file
@@ -0,0 +1,18 @@
|
||||
import uvicorn
|
||||
from fastapi import FastAPI
|
||||
|
||||
from {{ app_name }}.views import router
|
||||
|
||||
app = FastAPI()
|
||||
|
||||
|
||||
@app.get("/")
|
||||
async def index():
|
||||
return {"msg": "index"}
|
||||
|
||||
|
||||
app.include_router(router)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
uvicorn.run(app)
|
||||
Reference in New Issue
Block a user