Configurable back-end port

This commit is contained in:
Raffson
2024-02-10 17:58:44 +01:00
parent 63d05ea696
commit cb68ff0df3
8 changed files with 62 additions and 13 deletions

View File

@@ -8,6 +8,7 @@ from PySide6.QtWebEngineCore import QWebEnginePage, QWebEngineSettings
from PySide6.QtWebEngineWidgets import QWebEngineView
from game.server.settings import ServerSettings
from qt_ui.liberation_install import server_port
from qt_ui.models import GameModel
@@ -44,7 +45,7 @@ class QLiberationMap(QWebEngineView):
url = QUrl("http://localhost:3000")
else:
url = QUrl.fromLocalFile(str(Path("client/build/index.html").resolve()))
server_settings = ServerSettings.get()
server_settings = ServerSettings.get(server_port())
host = server_settings.server_bind_address
if host.startswith("::"):
host = f"[{host}]"