Make port configurable (default 5100)

- Port now set via config.json "port" field
- Aggregator reads PORT from environment variable
- Updated all docs and scripts to use port 5100

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-02 23:24:24 -06:00
parent 5783a52cfa
commit 3e99780e87
6 changed files with 25 additions and 17 deletions

View File

@@ -4,6 +4,7 @@ A lightweight event broker that manages priority-based system status.
"""
import json
import os
import random
import threading
import time
@@ -252,6 +253,8 @@ def list_events():
def main():
port = int(os.environ.get("PORT", 5100))
# Write initial optimal state
write_status()
print(f"Status file: {STATUS_FILE}")
@@ -261,7 +264,7 @@ def main():
cleanup_thread.start()
# Run Flask
app.run(host="0.0.0.0", port=5000, threaded=True)
app.run(host="0.0.0.0", port=port, threaded=True)
if __name__ == "__main__":