LuTong 2 ماه پیش
والد
کامیت
f90b656c6b
5فایلهای تغییر یافته به همراه93 افزوده شده و 0 حذف شده
  1. 20 0
      alien_gateway/main.py
  2. 18 0
      alien_lawyer/main.py
  3. 18 0
      alien_second/main.py
  4. 19 0
      alien_store/main.py
  5. 18 0
      alien_store_platform/main.py

+ 20 - 0
alien_gateway/main.py

@@ -0,0 +1,20 @@
+from fastapi import FastAPI
+from alien_gateway.config import settings
+
+app = FastAPI(
+    title=f"{settings.PROJECT_NAME} - Gateway & Auth Service",
+    version="1.0.0"
+)
+
+@app.get("/health")
+async def health():
+    return {"service": "alien_gateway", "status": "ok"}
+
+# 此模块未来将承担 JWT 签发、权限校验中间件、路由聚合等核心功能
+@app.post("/auth/login")
+async def login():
+    return {"message": "Auth logic here"}
+
+if __name__ == "__main__":
+    import uvicorn
+    uvicorn.run(app, host="0.0.0.0", port=8000)

+ 18 - 0
alien_lawyer/main.py

@@ -0,0 +1,18 @@
+from fastapi import FastAPI
+from alien_lawyer.router import router
+from alien_gateway.config import settings
+
+app = FastAPI(
+    title=f"{settings.PROJECT_NAME} - Lawyer Service",
+    version="1.0.0"
+)
+
+app.include_router(router, prefix="/api/lawyer", tags=["Lawyer"])
+
+@app.get("/health")
+async def health():
+    return {"service": "alien_lawyer", "status": "ok"}
+
+if __name__ == "__main__":
+    import uvicorn
+    uvicorn.run(app, host="0.0.0.0", port=8004)

+ 18 - 0
alien_second/main.py

@@ -0,0 +1,18 @@
+from fastapi import FastAPI
+from alien_second.router import router
+from alien_gateway.config import settings
+
+app = FastAPI(
+    title=f"{settings.PROJECT_NAME} - Second Hand Service",
+    version="1.0.0"
+)
+
+app.include_router(router, prefix="/api/second", tags=["Second Hand"])
+
+@app.get("/health")
+async def health():
+    return {"service": "alien_second", "status": "ok"}
+
+if __name__ == "__main__":
+    import uvicorn
+    uvicorn.run(app, host="0.0.0.0", port=8003)

+ 19 - 0
alien_store/main.py

@@ -0,0 +1,19 @@
+from fastapi import FastAPI
+from alien_store.router import router
+from alien_gateway.config import settings
+
+app = FastAPI(
+    title=f"{settings.PROJECT_NAME} - Store Service",
+    version="1.0.0"
+)
+
+# 挂载业务路由
+app.include_router(router, prefix="/api/store", tags=["Store"])
+
+@app.get("/health")
+async def health():
+    return {"service": "alien_store", "status": "ok"}
+
+if __name__ == "__main__":
+    import uvicorn
+    uvicorn.run(app, host="0.0.0.0", port=8001)

+ 18 - 0
alien_store_platform/main.py

@@ -0,0 +1,18 @@
+from fastapi import FastAPI
+from alien_store_platform.router import router
+from alien_gateway.config import settings
+
+app = FastAPI(
+    title=f"{settings.PROJECT_NAME} - Platform Service",
+    version="1.0.0"
+)
+
+app.include_router(router, prefix="/api/platform", tags=["Platform"])
+
+@app.get("/health")
+async def health():
+    return {"service": "alien_store_platform", "status": "ok"}
+
+if __name__ == "__main__":
+    import uvicorn
+    uvicorn.run(app, host="0.0.0.0", port=8002)