Update fun.py
Browse files
fun.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
from fastapi import FastAPI, Request, Response, status
|
| 2 |
import httpx
|
|
|
|
| 3 |
|
| 4 |
app = FastAPI()
|
| 5 |
TARGET_BASE = "http://127.0.0.1:8001" # 替换为你的目标服务器
|
|
@@ -28,4 +29,4 @@ async def proxy(request: Request, path: str):
|
|
| 28 |
|
| 29 |
if __name__ == "__main__":
|
| 30 |
# 运行FastAPI应用
|
| 31 |
-
uvicorn.run("
|
|
|
|
| 1 |
from fastapi import FastAPI, Request, Response, status
|
| 2 |
import httpx
|
| 3 |
+
import uvicorn
|
| 4 |
|
| 5 |
app = FastAPI()
|
| 6 |
TARGET_BASE = "http://127.0.0.1:8001" # 替换为你的目标服务器
|
|
|
|
| 29 |
|
| 30 |
if __name__ == "__main__":
|
| 31 |
# 运行FastAPI应用
|
| 32 |
+
uvicorn.run("fun:app", host="0.0.0.0", port=8000, reload=True)
|