uu_pixiv_api / app.py
rogerxavier's picture
Upload 6 files
4117d38 verified
raw
history blame contribute delete
829 Bytes
from fastapi import FastAPI
from server.utils import config
from getNode import router as GetNodeRouter
from randomSubscribeUrl import router as randomSubscribeUrlRouter
from validSubCount import router as validSubCountRouter
import uvicorn
app = FastAPI()
fileName = "subscribeLink.txt"
randomSubscribeUrlRouter.fileName = fileName
validSubCountRouter.fileName = fileName
GetNodeRouter.fileName = fileName
@app.get("/uu.json", tags=["Root"])
async def read_root() -> dict:
return config
#全局路由
app.include_router(GetNodeRouter, prefix="/getNode")
app.include_router(randomSubscribeUrlRouter, prefix="/randomSubscribeUrl")
app.include_router(validSubCountRouter, prefix="/validSubCount")
#这个是部署hf上
if __name__ == '__main__':
uvicorn.run(app, host='0.0.0.0', port=7860)