From 30ea7199f5ae909fd06ab7af1ee6bd63e3943e6d Mon Sep 17 00:00:00 2001 From: jejolare Date: Sat, 21 Sep 2024 17:49:49 +0700 Subject: [PATCH] update base config --- src/config/config.example.ts | 2 -- src/utils/socket.ts | 11 +---------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/src/config/config.example.ts b/src/config/config.example.ts index b68e416..e18ffbd 100644 --- a/src/config/config.example.ts +++ b/src/config/config.example.ts @@ -1,7 +1,5 @@ const NET_MODE: "TEST" | "MAIN" = "MAIN"; -const SERVER_PORT_DEV: number = 4596; export { NET_MODE, - SERVER_PORT_DEV }; \ No newline at end of file diff --git a/src/utils/socket.ts b/src/utils/socket.ts index 8e2cca2..ae916b4 100644 --- a/src/utils/socket.ts +++ b/src/utils/socket.ts @@ -1,12 +1,3 @@ import { io } from 'socket.io-client'; -import { SERVER_PORT_DEV } from '../config/config'; - -// "undefined" means the URL will be computed from the `window.location` object -const URL = process.env.NODE_ENV === 'production' ? undefined : `http://localhost:${SERVER_PORT_DEV}`; - - -console.log("URL", URL); - - // @ts-ignore -export const socket = io(URL); \ No newline at end of file +export const socket = io(); \ No newline at end of file