From 2a7c87605cf91afdffb362149c465311747545cf Mon Sep 17 00:00:00 2001 From: Ashhhleyyy Date: Sat, 13 Aug 2022 16:10:22 +0100 Subject: [PATCH] fix: allow specifing game server url in environment variable --- src/App.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App.svelte b/src/App.svelte index b0ab0d0..241ec93 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -31,7 +31,7 @@ function joinGame(uname: string, gameId: string) { players = []; - socket = io(`http://${window.location.hostname}:3000/`); + socket = io(import.meta.env.GAMESERVER_URL || `http://${window.location.hostname}:3000/`); socket.on('connect', () => { socket.emit('joinGame', gameId, uname, (result) => { if (result.error === false) {