From b772ad9b0c0c4284e6f8fc87e675e4d44f272959 Mon Sep 17 00:00:00 2001 From: MetaMuffin Date: Fri, 6 Aug 2021 14:22:03 +0200 Subject: changed websocket endpoint --- source/client/room.ts | 2 +- source/server/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'source') diff --git a/source/client/room.ts b/source/client/room.ts index 3e3ed19..1b750f2 100644 --- a/source/client/room.ts +++ b/source/client/room.ts @@ -19,7 +19,7 @@ export class Room { this.name = name this.el = document.createElement("div") this.el.classList.add("room") - this.websocket = new WebSocket(`ws://${window.location.host}/room/${encodeURIComponent(name)}`) + this.websocket = new WebSocket(`ws://${window.location.host}/signaling/${encodeURIComponent(name)}`) this.websocket.onclose = () => this.websocket_close() this.websocket.onopen = () => this.websocket_open() this.websocket.onmessage = (ev) => { diff --git a/source/server/index.ts b/source/server/index.ts index 470e289..f9d0e6e 100644 --- a/source/server/index.ts +++ b/source/server/index.ts @@ -44,7 +44,7 @@ async function main() { app.use("/static", estatic(join(__dirname, "../../public"))); - app.ws("/room/:id", (ws, req) => { + app.ws("/signaling/:id", (ws, req) => { const room_name = req.params.id const room: Map = rooms.get(req.params.id) ?? new Map() let initialized = false -- cgit v1.2.3-70-g09d2