km0 2 years ago
parent 0ce1248a8c
commit 48c2580de4

@ -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,
});

@ -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" }));

@ -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) => {

Loading…
Cancel
Save