cli.py 457 B

1234567891011121314151617181920212223
  1. from __future__ import annotations
  2. import os
  3. import uvicorn
  4. def main() -> None:
  5. host = os.getenv("HISTORY_REVIEW_HOST", "127.0.0.1")
  6. port = int(os.getenv("HISTORY_REVIEW_PORT", "8777"))
  7. reload = os.getenv("HISTORY_REVIEW_RELOAD", "1").strip() not in {"0", "false", "False"}
  8. uvicorn.run(
  9. "historical_review.web.app:app",
  10. host=host,
  11. port=port,
  12. reload=reload,
  13. )
  14. if __name__ == "__main__":
  15. main()