hisham-cmd's picture
Upload main.py
b95d148 verified
Raw
History Blame Contribute Delete
988 Bytes
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)
@app.get("/")
async def root():
return {"message": "Welcome to GrowthPanel API", "status": "running"}
@app.get("/health")
async def health_check():
return {"status": "healthy"}