|
@@ -0,0 +1,27 @@
|
|
|
|
|
+from fastapi import FastAPI
|
|
|
|
|
+from alien_store.router import router as store_router
|
|
|
|
|
+from alien_store_platform.router import router as platform_router
|
|
|
|
|
+from alien_second.router import router as second_router
|
|
|
|
|
+from alien_lawyer.router import router as lawyer_router
|
|
|
|
|
+from alien_gateway.config import settings
|
|
|
|
|
+
|
|
|
|
|
+app = FastAPI(
|
|
|
|
|
+ title=settings.PROJECT_NAME,
|
|
|
|
|
+ description="Python 3.12 重构版本 - 异星云 (Alien Cloud)",
|
|
|
|
|
+ version="1.0.0",
|
|
|
|
|
+)
|
|
|
|
|
+
|
|
|
|
|
+# 注册各核心业务模块路由
|
|
|
|
|
+app.include_router(store_router, prefix="/api/store", tags=["Store"])
|
|
|
|
|
+app.include_router(platform_router, prefix="/api/platform", tags=["Platform"])
|
|
|
|
|
+app.include_router(second_router, prefix="/api/second", tags=["Second"])
|
|
|
|
|
+app.include_router(lawyer_router, prefix="/api/lawyer", tags=["Lawyer"])
|
|
|
|
|
+
|
|
|
|
|
+@app.get("/", tags=["Health Check"])
|
|
|
|
|
+async def root():
|
|
|
|
|
+ return {
|
|
|
|
|
+ "status": "online",
|
|
|
|
|
+ "project": "alien_py_cloud",
|
|
|
|
|
+ "version": "3.12",
|
|
|
|
|
+ "documentation": "/docs"
|
|
|
|
|
+ }
|