22 lines
634 B
Python
22 lines
634 B
Python
import uvicorn
|
|
from fastapi import FastAPI
|
|
|
|
from app.api.routes import health, products, categories
|
|
from app.core.config import settings
|
|
|
|
app = FastAPI(
|
|
title=settings.PROJECT_NAME,
|
|
description=settings.PROJECT_DESCRIPTION,
|
|
version=settings.PROJECT_VERSION,
|
|
docs_url="/docs",
|
|
redoc_url="/redoc",
|
|
)
|
|
|
|
# Include routers
|
|
app.include_router(health.router, tags=["health"])
|
|
app.include_router(products.router, prefix="/api/v1", tags=["products"])
|
|
app.include_router(categories.router, prefix="/api/v1", tags=["categories"])
|
|
|
|
if __name__ == "__main__":
|
|
uvicorn.run("main:app", host="0.0.0.0", port=8000, reload=True)
|