| 1234567891011121314151617181920 |
- 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)
|