add dev guide

This commit is contained in:
sparshg
2024-09-26 03:14:28 +05:30
parent 26e3d3db20
commit 36d2bcaf01
8 changed files with 40 additions and 64 deletions

View File

@@ -13,7 +13,8 @@ export class State {
socket: Socket;
constructor() {
this.socket = io(`wss://battleship.icyground-d91964e0.centralindia.azurecontainerapps.io`, {
const url = import.meta.env.DEV ? 'ws://localhost:3000' : 'wss://battleship.icyground-d91964e0.centralindia.azurecontainerapps.io';
this.socket = io(url, {
transports: ['websocket'],
auth: { session: sessionStorage.getItem('session') }
});