feat: TUI als Browser-App via textual serve
TUI von direkten Service-Importen auf httpx API-Calls umgestellt. Neue tui/api_client.py als schlanker async HTTP-Client. Background- Worker pollt API alle 5s für Echtzeit-Updates. Neuer tui_standalone.py Entry-Point für 'textual serve --port 8001 tui_standalone.py'.
This commit is contained in:
21
tui_standalone.py
Normal file
21
tui_standalone.py
Normal file
@@ -0,0 +1,21 @@
|
||||
"""MCM TUI – Standalone Entry Point für textual serve.
|
||||
|
||||
Startet nur die TUI (kein API-Server, keine Channels).
|
||||
Die TUI spricht via HTTP gegen den laufenden MCM-API-Server.
|
||||
|
||||
Verwendung:
|
||||
# API-Server muss bereits laufen:
|
||||
python main_api_only.py
|
||||
|
||||
# TUI im Browser starten:
|
||||
.venv/bin/python -m textual serve --host 0.0.0.0 --port 8001 tui_standalone.py
|
||||
|
||||
# Dann im Browser öffnen: http://<host>:8001
|
||||
"""
|
||||
|
||||
from tui.app import MCMApp
|
||||
|
||||
app = MCMApp()
|
||||
|
||||
if __name__ == "__main__":
|
||||
app.run()
|
||||
Reference in New Issue
Block a user