add dev guide

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

No files matched your search

+2 -1
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') }
});