Files
2026-05-25 15:09:42 +08:00

34 lines
1022 B
Python

# ZeekerWatchman - FastAPI Application Entry Point
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from server.config import settings
from server.api.routes import prd, ir, testcase, skills, chat
app = FastAPI(
title="ZeekerWatchman",
description="测试用例智能管理平台 - 将 PRD 转化为可执行测试用例",
version="0.1.0",
redirect_slashes=False,
)
app.add_middleware(
CORSMiddleware,
allow_origins=settings.CORS_ORIGINS,
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)
app.include_router(prd.router, prefix="/api/prd", tags=["PRD"])
app.include_router(ir.router, prefix="/api/ir", tags=["IR"])
app.include_router(testcase.router, prefix="/api/testcase", tags=["Testcase"])
app.include_router(skills.router, prefix="/api/skills", tags=["Skills"])
app.include_router(chat.router, prefix="/api/chat", tags=["Chat"])
@app.get("/api/health")
async def health_check():
return {"status": "ok", "version": "0.1.0"}