From 488239c59313c025d980aafa5a13b0388bdfc55b Mon Sep 17 00:00:00 2001 From: Shawn Date: Sat, 23 May 2026 15:18:45 -0400 Subject: [PATCH] support SERVE_HOST env var for binding to 0.0.0.0 --- serve.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/serve.py b/serve.py index bb30d33..d974ff5 100755 --- a/serve.py +++ b/serve.py @@ -11,6 +11,7 @@ import httpx SCRIPT_DIR = Path(__file__).resolve().parent STATIC_DIR = SCRIPT_DIR PORT = int(os.environ.get("SERVE_PORT", "18834")) +HOST = os.environ.get("SERVE_HOST", "127.0.0.1") app = FastAPI(title="Project Directory") @@ -192,4 +193,4 @@ async def index(path: str = ""): if __name__ == "__main__": import uvicorn - uvicorn.run(app, host="127.0.0.1", port=PORT) + uvicorn.run(app, host=HOST, port=PORT)