From 5d35299578411c22fa3b638249c6c7c665008cd2 Mon Sep 17 00:00:00 2001 From: "Victor A." <52110451+cs50victor@users.noreply.github.com> Date: Wed, 21 Feb 2024 01:29:43 -0500 Subject: [PATCH] fix: ws url logic error --- demo/components/WebSocketExample.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demo/components/WebSocketExample.tsx b/demo/components/WebSocketExample.tsx index b232bfe..187f8f1 100644 --- a/demo/components/WebSocketExample.tsx +++ b/demo/components/WebSocketExample.tsx @@ -12,7 +12,7 @@ export interface ServerWSResponse { } export default function WebSocketExample({port = 8080}:{port?:number}){ - const server_ws_url = process.env.NODE_ENV === "production" ? `ws://localhost:${port}` : "ws://new-media.fly.dev" + const server_ws_url = process.env.NODE_ENV != "production" ? `wss://localhost:${port}` : "ws://new-media.fly.dev" const [imgMetadata, setImageMetadata] = useState(); const [socket, setSocket] = useState()