-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
33 lines (27 loc) · 823 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import uvicorn
from fastapi import FastAPI
from starlette.middleware.cors import CORSMiddleware
from src.wire.router import router_wire, router_source
from src.sheet.router import router as router_sheet
from src.report.router import router_category
from src.rep.router import router_report
from src.group.router import router_group
app = FastAPI()
origins = [
"http://localhost:5173",
]
app.add_middleware(
CORSMiddleware,
allow_origins=origins,
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)
app.include_router(router_source)
app.include_router(router_wire)
app.include_router(router_group)
app.include_router(router_report)
app.include_router(router_category)
app.include_router(router_sheet)
if __name__ == "__main__":
uvicorn.run(app, host="127.0.0.1", port=9999)