xref: /expo/packages/@expo/cli/src/api/endpoint.ts (revision fccdf697)
1import { env } from '../utils/env';
2
3/** Get the URL for the expo.dev API. */
4export function getExpoApiBaseUrl(): string {
5  if (env.EXPO_STAGING) {
6    return `https://staging-api.expo.dev`;
7  } else if (env.EXPO_LOCAL) {
8    return `http://127.0.0.1:3000`;
9  } else {
10    return `https://api.expo.dev`;
11  }
12}
13
14/** Get the URL for the expo.dev website. */
15export function getExpoWebsiteBaseUrl(): string {
16  if (env.EXPO_STAGING) {
17    return `https://staging.expo.dev`;
18  } else if (env.EXPO_LOCAL) {
19    return `http://127.0.0.1:3001`;
20  } else {
21    return `https://expo.dev`;
22  }
23}
24