main.py 542 B

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