diff --git a/app/web.ts b/app/web.ts index 9bea2d9..d791202 100644 --- a/app/web.ts +++ b/app/web.ts @@ -69,7 +69,7 @@ export default ((publicPath: string) => { log.info(`Webserver started on ${port}`); }); - const wss: any = new WebSocket.Server({ port: 8080 }); + const wss: any = new WebSocket.Server({ server, path: '/wss' }); wss.broadcast = (data) => { wss.clients.forEach((client) => { diff --git a/www/lib/Hey.js b/www/lib/Hey.js index 6c0bf73..bb9c8b9 100644 --- a/www/lib/Hey.js +++ b/www/lib/Hey.js @@ -1,6 +1,6 @@ class Hey { constructor() { - this.socket = new WebSocket(`ws://${window.location.hostname}:8080`); + this.socket = new WebSocket(`ws://${window.location.hostname}:${window.location.port}/wss`); this.events = {}; this.open = false;