31 lines
888 B
Python
31 lines
888 B
Python
from fastapi import FastAPI
|
|
from api.example import example_router
|
|
from middleware import log_middleware
|
|
from api.statistics import statistics_router
|
|
import uvicorn
|
|
from api.student import student_router
|
|
app = FastAPI()
|
|
app.middleware("http")(log_middleware)
|
|
|
|
#-------------朱婷婷--------------
|
|
from api.class_api import classes_router
|
|
app.include_router(classes_router,tags=['班级接口'],prefix="/classes")
|
|
|
|
#-------------李玉杰--------------
|
|
app.include_router(student_router)
|
|
#-------------张义---------------
|
|
|
|
#-------------薄鑫---------------
|
|
|
|
#-------------张昕浩---------------
|
|
app.include_router(example_router)
|
|
app.include_router(statistics_router, prefix="/statistics")
|
|
|
|
#-------------曾凯---------------
|
|
|
|
#-------------南方宇---------------
|
|
|
|
#-----------主程序----------------
|
|
|
|
if __name__ == "__main__":
|
|
uvicorn.run(app, host="0.0.0.0", port=23333) |