Порт по умолчанию 18091, привязка через HOST

This commit is contained in:
apuc committed 2026-09-16 12:17:18 +03:00
1 parent 25b46a0b2a
commit adf6fd24f7
1 file changed
+4 -2
+4 -2
View File
@@ -549,5 +549,7 @@ def api_reset(name):
if __name__ == "__main__":
print("Откройте http://localhost:5000")
app.run(host="127.0.0.1", port=5000, debug=False)
port = int(os.environ.get("PORT", "18091"))
host = os.environ.get("HOST", "127.0.0.1")
print(f"Откройте http://localhost:{port}")
app.run(host=host, port=port, debug=False)