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
636 B

import { readSelectedApi } from 'helpers/selectedApi'
import { ENV, isProduction } from './env'
export const APIS = {
preproduction: {
api: 'https://api.instat.tv', // 'https://api-aws-stage.instat.tv:11630',
auth: 'https://auth.instat.tv',
},
production: {
api: 'https://api.instat.tv',
auth: 'https://auth.instat.tv',
},
staging: {
api: 'https://api-staging.instat.tv',
auth: 'https://test-auth.instat.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`