added deployment

This commit is contained in:
evanpelle
2024-08-13 20:07:20 -07:00
parent efd5f65787
commit 001722bd59
11 changed files with 90 additions and 70 deletions
+2 -1
View File
@@ -60,7 +60,8 @@ export class ClientGame {
) { }
public joinLobby() {
this.socket = new WebSocket(`ws://localhost:3000`)
const wsHost = process.env.WEBSOCKET_URL || window.location.host;
this.socket = new WebSocket(`ws://${wsHost}`)
this.socket.onopen = () => {
console.log('Connected to game server!');
this.socket.send(