|
@@ -4,9 +4,11 @@
|
|
|
// export const API_URL = "https://xxx.com/api";
|
|
|
// export const USER_URL = "https://xxx.com/chat";
|
|
|
|
|
|
-export const WS_URL = "ws://20.189.74.163:10001";
|
|
|
-export const API_URL = "http://20.189.74.163:10002";
|
|
|
-export const CHAT_URL = "http://20.189.74.163:10008";
|
|
|
+const serverIP = "20.189.74.163";
|
|
|
+
|
|
|
+export const WS_URL = `ws://${serverIP}:10001`;
|
|
|
+export const API_URL = `http://${serverIP}:10002`;
|
|
|
+export const CHAT_URL = `http://${serverIP}:10008`;
|
|
|
|
|
|
export const getWsUrl = () => localStorage.getItem("wsUrl") || WS_URL;
|
|
|
export const getApiUrl = () => localStorage.getItem("apiUrl") || API_URL;
|