You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

23 lines
592 B

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