23 lines
549 B
Python
23 lines
549 B
Python
import app
|
||
import unicorn
|
||
from fastapi import FastAPI
|
||
|
||
app = FastAPI()
|
||
|
||
@app.get('/')
|
||
def health():
|
||
return '8005成功'
|
||
|
||
if __name__ == '__main__':
|
||
import uvicorn
|
||
uvicorn.run(app,host='127.0.0.1',port=8005)
|
||
|
||
|
||
# 访问入口
|
||
# 前端页面:http://localhost:81
|
||
# 后端 API 文档:http://localhost:9090/docs
|
||
# MySQL 连接:localhost:3308(root / 123456)
|
||
# 提示:如以后需要重新初始化数据库,执行 docker compose down -v(-v 会删除数据卷)
|
||
# 后再 docker compose up -d,初始化 SQL 会重新执行。
|
||
|