Files
yxe-mp/config/index.js
T

24 lines
588 B
JavaScript

const MAIN_API_FN = () => {
if (process.env.NODE_ENV === 'development') {
return 'http://127.0.0.1:10051'
// return 'https://yxe-api.gxwebsoft.com'
} else {
return 'https://yxe-api.gxwebsoft.com'
}
}
const MAIN_WS_FN = () => {
if (process.env.NODE_ENV === 'development') {
return 'ws://127.0.0.1:10051/chat'
// return 'wss://guoxue.gxwebsoft.com/chat'
} else {
return 'wss://yxe-api.gxwebsoft.com'
}
}
export const MAIN_API = MAIN_API_FN()
export const WS_API = MAIN_WS_FN()
export const API = `${MAIN_API}/api`