diff --git a/frontend/src/const/config.ts b/frontend/src/const/config.ts index e7ac3e3..e786b15 100644 --- a/frontend/src/const/config.ts +++ b/frontend/src/const/config.ts @@ -1,4 +1,3 @@ -export const useLocalServer = false; export const isAlpha = true; export type Server = { @@ -6,15 +5,13 @@ export type Server = { wsServerAdress: string; }; -export const server: Server = useLocalServer ? { - serverAdress: "http://localhost:5000", - wsServerAdress: "ws://localhost:5000", -} : isAlpha ? { - serverAdress: "https://segin.one/mancala-backend-alpha", - wsServerAdress: "wss://segin.one/mancala-backend-alpha/", -} : { - serverAdress: "https://segin.one/mancala-backend-beta", - wsServerAdress: "wss://segin.one/mancala-backend-beta/", -}; +export const LOCAL_PORT='localhost:5005'; + +export const server: Server = { + //@ts-ignore + serverAdress: process.env.SERVER_ADDRESS ? `https://${process.env.SERVER_ADDRESS}` : 'http://' + LOCAL_PORT, + //@ts-ignore + wsServerAdress: process.env.SERVER_ADDRESS ? `wss://${process.env.SERVER_ADDRESS}` : 'ws://' + LOCAL_PORT, +} export const RTMT_WS_PING_INTERVAL = 1000, RTMT_WS_PING_INTERVAL_BUFFER_TIME = 2000; \ No newline at end of file