Added different address for express backend

This commit is contained in:
Pax1601
2024-11-12 16:50:01 +01:00
parent 9d225bfc1a
commit 53237c6197
5 changed files with 20 additions and 12 deletions

View File

@@ -39,7 +39,7 @@ export class ServerManager {
getApp().getShortcutManager().addShortcut("togglePause", {
label: "Pause data update",
callback: () => {
keyUpCallback: () => {
this.setPaused(!this.getPaused());
},
code: "Space"
@@ -138,7 +138,7 @@ export class ServerManager {
getConfig(callback: CallableFunction) {
var xmlHttp = new XMLHttpRequest();
xmlHttp.open("GET", window.location.href.split("?")[0].replace("vite/", "") + "config", true);
xmlHttp.open("GET", getApp().getExpressAddress() + "config", true);
xmlHttp.onload = function (e) {
var data = JSON.parse(xmlHttp.responseText);
callback(data);