fix: allow specifing game server url in environment variable
This commit is contained in:
parent
bf11761bc8
commit
2a7c87605c
1 changed files with 1 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue