| File was renamed from aigc-director/aigc-claw/backend/api/app.py |
| | |
| | | |
| | | @asynccontextmanager |
| | | async def lifespan(app: FastAPI): |
| | | logger.info("Starting AIGC-Claw API") |
| | | logger.info("Starting Video-Claw API") |
| | | logger.info("Code directory mounted at /code: %s", settings.CODE_DIR) |
| | | yield |
| | | logger.info("AIGC-Claw API shutdown complete") |
| | | logger.info("Video-Claw API shutdown complete") |
| | | |
| | | |
| | | app = FastAPI(title="AI导演工作室", version="2.0.0", lifespan=lifespan) |
| | | app = FastAPI(title="Video-Claw", version="2.0.0", lifespan=lifespan) |
| | | |
| | | app.add_middleware( |
| | | CORSMiddleware, |
| | |
| | | |
| | | @app.get("/") |
| | | async def root(): |
| | | return {"service": "AI导演工作室", "version": "2.0.0", "health": "/api/health"} |
| | | return {"service": "Video-Claw", "version": "2.0.0", "health": "/api/health"} |