pages: PAGES_HOST (bind address); a private copy on hb-5 serves the maths site

This commit is contained in:
teahubxyz committed 2026-10-14 15:56:46 -07:00
1 parent 4576fd8d9a
commit b3d35aa43b
3 files changed
+12 -1

No files matched your search

+2 -1
View File
@@ -199,4 +199,5 @@ class Handler(http.server.BaseHTTPRequestHandler):
if __name__ == "__main__":
DATA.mkdir(parents=True, exist_ok=True)
threading.Thread(target=loop, daemon=True).start()
http.server.ThreadingHTTPServer(("0.0.0.0", int(os.environ.get("PORT") or 8080)), Handler).serve_forever()
bind = os.environ.get("PAGES_HOST") or "0.0.0.0" # 127.0.0.1 for a private copy (hb-5)
http.server.ThreadingHTTPServer((bind, int(os.environ.get("PORT") or 8080)), Handler).serve_forever()