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)