add SERVER_ADDRESS

This commit is contained in:
Halit Aksoy 2024-03-24 19:02:48 +03:00
parent 53f94daacc
commit bf6ad33796

View File

@ -1,4 +1,3 @@
export const useLocalServer = false;
export const isAlpha = true; export const isAlpha = true;
export type Server = { export type Server = {
@ -6,15 +5,13 @@ export type Server = {
wsServerAdress: string; wsServerAdress: string;
}; };
export const server: Server = useLocalServer ? { export const LOCAL_PORT='localhost:5005';
serverAdress: "http://localhost:5000",
wsServerAdress: "ws://localhost:5000", export const server: Server = {
} : isAlpha ? { //@ts-ignore
serverAdress: "https://segin.one/mancala-backend-alpha", serverAdress: process.env.SERVER_ADDRESS ? `https://${process.env.SERVER_ADDRESS}` : 'http://' + LOCAL_PORT,
wsServerAdress: "wss://segin.one/mancala-backend-alpha/", //@ts-ignore
} : { wsServerAdress: process.env.SERVER_ADDRESS ? `wss://${process.env.SERVER_ADDRESS}` : 'ws://' + LOCAL_PORT,
serverAdress: "https://segin.one/mancala-backend-beta", }
wsServerAdress: "wss://segin.one/mancala-backend-beta/",
};
export const RTMT_WS_PING_INTERVAL = 1000, RTMT_WS_PING_INTERVAL_BUFFER_TIME = 2000; export const RTMT_WS_PING_INTERVAL = 1000, RTMT_WS_PING_INTERVAL_BUFFER_TIME = 2000;