From 8234530ed745b7538bd4f1e5baa420185ca6ebf8 Mon Sep 17 00:00:00 2001 From: ale Date: Thu, 13 Nov 2025 20:52:36 +0100 Subject: [PATCH] public socket Signed-off-by: ale --- lib/store.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/store.ts b/lib/store.ts index 1f84069..6663ec6 100644 --- a/lib/store.ts +++ b/lib/store.ts @@ -43,7 +43,8 @@ export const useGameStore = create((set, get) => ({ pendingPlayerName: null, initSocket: () => { - const socket = io('http://localhost:3000', { + const socketUrl = process.env.NEXT_PUBLIC_SOCKET_URL || 'http://localhost:3000'; + const socket = io(socketUrl, { transports: ['websocket', 'polling'], });