28 lines
496 B
Python
28 lines
496 B
Python
from fastapi import FastAPI
|
|
from app.routers import delivery
|
|
from fastapi.middleware.cors import CORSMiddleware
|
|
|
|
app = FastAPI()
|
|
|
|
app.include_router(delivery.router)
|
|
|
|
|
|
origins = [
|
|
"http://localhost:9000",
|
|
"https://localhost:5173",
|
|
"http://localhost",
|
|
|
|
]
|
|
|
|
app.add_middleware(
|
|
CORSMiddleware,
|
|
allow_origins=origins,
|
|
allow_credentials=True,
|
|
allow_methods=["*"],
|
|
allow_headers=["*"],
|
|
)
|
|
|
|
@app.get("/")
|
|
def read_root():
|
|
return {"Status": "Money Service is online"}
|