From 752971e780df19edeabcbe75aab888aa9940c23c Mon Sep 17 00:00:00 2001 From: Kristian Tot Date: Tue, 23 Jul 2024 13:35:23 +0200 Subject: [PATCH] update url formatting --- src/nodb-event-listener.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nodb-event-listener.ts b/src/nodb-event-listener.ts index aef38cf..da9dce7 100644 --- a/src/nodb-event-listener.ts +++ b/src/nodb-event-listener.ts @@ -16,8 +16,8 @@ class NodbEventListener { const envUrlPart = props.envName ? `/${props.envName}` : ""; const formattedBaseUrl = props.baseUrl - .replace("http:", "ws:") - .replace("https:", "wss:"); + .replace("http://", "ws://") + .replace("https://", "wss://"); this.socket = new WebSocket( `${formattedBaseUrl}/ws/${props.appName}${envUrlPart}`, {