Spaces:
Runtime error
Runtime error
# uvicorn app:app --host localhost --port 7860 --reload | |
from library.librerias import * | |
from routers.routers import * | |
app = FastAPI( | |
title="API Arte Visual", | |
description="Esta es la API de la 贸ptica del curso de ADS", | |
version="1.2.1", | |
openapi_url="/optica-openapi.json", | |
docs_url="/optica-docs", | |
redoc_url="/optica-redoc", | |
) | |
# CORS | |
app.add_middleware( | |
CORSMiddleware, | |
allow_origins=["*"], | |
allow_credentials=True, | |
allow_methods=["*"], | |
allow_headers=["*"], | |
) | |
# saludo | |
def read_root(): | |
return {"message": "Bienvenido a la API de la 贸ptica"} | |
# Routers | |
app.router.include_router(boletas.router) | |
app.router.include_router(clientes.router) | |
app.router.include_router(comprobante_pago.router) | |
app.router.include_router(lunas_pedido.router) | |
app.router.include_router(medidas.router) | |
app.router.include_router(monturas.router) | |
app.router.include_router(monturas_inventario.router) | |
app.router.include_router(monturas_pedido.router) | |
app.router.include_router(prescripciones.router) | |
app.router.include_router(roles.router) | |
app.router.include_router(usuarios.router) | |