26 lines
482 B
Python
26 lines
482 B
Python
from fastapi import FastAPI
|
|
from app.routers import delivery
|
|
from fastapi.middleware.cors import CORSMiddleware
|
|
from config import load_config
|
|
|
|
|
|
ApplicationConfig = load_config()
|
|
|
|
|
|
app = FastAPI()
|
|
|
|
app.include_router(delivery.router)
|
|
|
|
|
|
app.add_middleware(
|
|
CORSMiddleware,
|
|
allow_origins=ApplicationConfig.origins,
|
|
allow_credentials=True,
|
|
allow_methods=["*"],
|
|
allow_headers=["*"],
|
|
)
|
|
|
|
@app.get("/")
|
|
def read_root():
|
|
return {"Status": "Money Service is online"}
|