You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
654 B
23 lines
654 B
from fastapi import FastAPI
|
|
import uvicorn
|
|
from starlette.middleware.cors import CORSMiddleware
|
|
|
|
from pick_student import app1,app2
|
|
|
|
app=FastAPI(
|
|
title="学生点名系统",
|
|
description="学生点名系统",
|
|
version="1.0.0",
|
|
)
|
|
app.add_middleware(
|
|
CORSMiddleware,
|
|
allow_origins=["*"],
|
|
allow_credentials=True,
|
|
allow_methods=["*"], # 允许所有方法
|
|
allow_headers=["*"],
|
|
)
|
|
app.include_router(app1, prefix="/teacher/pick_student",tags=["学生点名系统"])
|
|
app.include_router(app2, prefix="/teacher",tags=["教师登录系统"])
|
|
if __name__=='__main__':
|
|
uvicorn.run('run:app',host='127.0.0.1',port=8000,reload=True)
|