You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
502 B
Python
19 lines
502 B
Python
import uvicorn
|
|
from fastapi import FastAPI
|
|
from routes import sync_message, config
|
|
|
|
app = FastAPI()
|
|
|
|
app.include_router(sync_message.router, prefix="/api/v1", tags=["SyncMessage"])
|
|
app.include_router(config.router, prefix="/api/v1", tags=["config"])
|
|
|
|
@app.get("/")
|
|
async def read_root():
|
|
"""
|
|
根路径路由,欢迎信息。
|
|
"""
|
|
return {"message": "Welcome to the FastAPI Application!"}
|
|
|
|
if __name__ == "__main__":
|
|
uvicorn.run("main:app", host="0.0.0.0", port=18000, reload=False)
|