From 48c2580de4c2feaa0c6b8852cb5dd596007abe6d Mon Sep 17 00:00:00 2001 From: "kam (from the studio)" Date: Tue, 17 Jan 2023 16:23:34 +0100 Subject: [PATCH] ops --- server.js | 2 -- views/destination.html | 2 +- views/index.html | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/server.js b/server.js index 85d49ab..3e43369 100644 --- a/server.js +++ b/server.js @@ -11,13 +11,11 @@ const PUBLIC = process.env.PUBLIC || ""; const router = express.Router(); const routes = (app) => { app.get("/", (req, res) => { - // res.sendFile("index.html", { root: __dirname }); res.render("index", { address: PREFIX, }); }); app.get("/destination", (req, res) => { - // res.sendFile("destination.html", { root: __dirname }); res.render("destination", { address: PREFIX, }); diff --git a/views/destination.html b/views/destination.html index 29507a0..7c0de32 100644 --- a/views/destination.html +++ b/views/destination.html @@ -33,7 +33,7 @@ const container = document.querySelector("#svg-container"); const socket = new ReconnectingWebSocket( - location.origin.replace(/^http/, "ws") + "{{location}}" + location.origin.replace(/^http/, "ws") + "{{address}}" ); socket.onopen = (event) => { socket.send(JSON.stringify({ type: "hello" })); diff --git a/views/index.html b/views/index.html index b3d8c72..f6086af 100644 --- a/views/index.html +++ b/views/index.html @@ -41,7 +41,7 @@ erase.addEventListener("click", () => deletePath()); const socket = new ReconnectingWebSocket( - location.origin.replace(/^http/, "ws") + "{{location}}" + location.origin.replace(/^http/, "ws") + "{{address}}" ); socket.onmessage = (event) => {