index.ts 611 B

123456789101112131415
  1. // WS 10001 API 10002 CHAT 10008 CONFIG 10009
  2. // export const WS_URL = "wss://xxx.com/msg_gateway";
  3. // export const API_URL = "https://xxx.com/api";
  4. // export const USER_URL = "https://xxx.com/chat";
  5. const serverIP = "20.189.74.163";
  6. export const WS_URL = `ws://${serverIP}:10001`;
  7. export const API_URL = `http://${serverIP}:10002`;
  8. export const CHAT_URL = `http://${serverIP}:10008`;
  9. export const getWsUrl = () => localStorage.getItem("wsUrl") || WS_URL;
  10. export const getApiUrl = () => localStorage.getItem("apiUrl") || API_URL;
  11. export const getChatUrl = () => localStorage.getItem("chatUrl") || CHAT_URL;