包含 FastAPI 应用、Nginx 反向代理配置、systemd 服务及腾讯云 pip 源配置。 Co-authored-by: Cursor <cursoragent@cursor.com>
14 lines
202 B
Python
14 lines
202 B
Python
from fastapi import FastAPI
|
|
|
|
app = FastAPI(title="hair")
|
|
|
|
|
|
@app.get("/")
|
|
async def hello():
|
|
return {"message": "Hello, World!"}
|
|
|
|
|
|
@app.get("/health")
|
|
async def health():
|
|
return {"status": "ok"}
|