Automated Action 609e7fb237 Implement retail management and payment API with FastAPI
This API provides endpoints for:
- Product and inventory management
- Customer management
- Order processing
- Payment processing with Stripe integration
- User authentication

generated with BackendIM... (backend.im)
2025-05-12 12:00:19 +00:00

27 lines
626 B
Python

import uvicorn
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from app.api.routes import router as api_router
from app.core.config import settings
app = FastAPI(
title=settings.PROJECT_NAME,
description="Retail Management and Payment API",
version="0.1.0",
)
# Set up CORS
app.add_middleware(
CORSMiddleware,
allow_origins=settings.CORS_ORIGINS,
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)
# Include routers
app.include_router(api_router)
if __name__ == "__main__":
uvicorn.run("main:app", host="0.0.0.0", port=8000, reload=True)