Spaces:
Sleeping
Sleeping
| from fastapi import FastAPI | |
| from fastapi.middleware.cors import CORSMiddleware | |
| from auth import router as auth_router | |
| from routers.services import router as services_router | |
| from routers.orders import router as orders_router | |
| from routers.payments import router as payments_router | |
| from routers.tickets import router as tickets_router | |
| app = FastAPI(title="GrowthPanel API", version="1.0.0") | |
| # Configure CORS | |
| app.add_middleware( | |
| CORSMiddleware, | |
| allow_origins=["*"], # Adjust in production | |
| allow_credentials=True, | |
| allow_methods=["*"], | |
| allow_headers=["*"], | |
| ) | |
| # Include Routers | |
| app.include_router(auth_router) | |
| app.include_router(services_router) | |
| app.include_router(orders_router) | |
| app.include_router(payments_router) | |
| app.include_router(tickets_router) | |
| async def root(): | |
| return {"message": "Welcome to GrowthPanel API", "status": "running"} | |
| async def health_check(): | |
| return {"status": "healthy"} | |