use local port

This commit is contained in:
Sebastian 2023-08-02 10:30:40 -03:00
parent 22a3017d52
commit 60929c34f3
No known key found for this signature in database
GPG Key ID: 173909D1A5F66069

View File

@ -2,8 +2,7 @@
function setupLiveReload(): void { function setupLiveReload(): void {
const protocol = window.location.protocol === "http:" ? "ws:" : "wss:"; const protocol = window.location.protocol === "http:" ? "ws:" : "wss:";
const port = window.location.protocol === "http:" ? "8080" : "8081"; const ws = new WebSocket(`${protocol}//${window.location.hostname}:${window.location.port}/ws`);
const ws = new WebSocket(`${protocol}//localhost:${port}/ws`);
ws.addEventListener("message", (message) => { ws.addEventListener("message", (message) => {
try { try {