main.py 476 B

12345678910111213141516171819
  1. from fastapi import FastAPI
  2. from alien_store.router import router
  3. from alien_gateway.config import settings
  4. app = FastAPI(
  5. title=f"{settings.PROJECT_NAME} - Store Service",
  6. version="1.0.0"
  7. )
  8. # 挂载业务路由
  9. app.include_router(router, prefix="/api/store", tags=["Store"])
  10. @app.get("/health")
  11. async def health():
  12. return {"service": "alien_store", "status": "ok"}
  13. if __name__ == "__main__":
  14. import uvicorn
  15. uvicorn.run(app, host="0.0.0.0", port=8001)