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.
 
 
 
 
spa_instat_tv/src/config/routes.tsx

24 lines
605 B

import { readSelectedApi } from 'helpers/selectedApi'
import { ENV, isProduction } from './env'
export const APIS = {
preproduction: {
api: 'https://api.insports.tv',
auth: 'https://auth.insports.tv',
},
production: {
api: 'https://api.insports.tv',
auth: 'https://auth.insports.tv',
},
staging: {
api: 'https://api.test.insports.tv',
auth: 'https://www.auth.test.insports.tv',
},
}
const env = isProduction ? ENV : readSelectedApi() ?? ENV
export const AUTH_SERVICE = APIS[env].auth
export const API_ROOT = APIS[env].api
export const DATA_URL = `${API_ROOT}/data`