Fix webSocket address bug

This commit is contained in:
Abász 2023-03-22 20:21:28 +01:00
parent 28d223c109
commit 457c96fe3c
1 changed files with 1 additions and 1 deletions

View File

@ -38,7 +38,7 @@ export function createApp (app) {
let initialWebsocketOpenend = true
function initWebsocket () {
// use the native websocket implementation of browser to communicate with backend
socket = new WebSocket('ws://localhost:100/websocket')
socket = new WebSocket(`ws://${location.host}/websocket`)
socket.addEventListener('open', (event) => {
console.log('websocket opened')