Squash merge feat/expo-app: app-expo, .cursor, workflows, package.json, .husky; remove app-android, app-ios, react-app
This commit is contained in:
25
app-expo/src/core/config.ts
Normal file
25
app-expo/src/core/config.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
const DEV_API_URL = 'http://127.0.0.1:8000';
|
||||
const DEV_WS_URL = 'ws://127.0.0.1:8000';
|
||||
|
||||
const PROD_API_URL = 'https://lifecho.worldsplats.com';
|
||||
const PROD_WS_URL = 'wss://lifecho.worldsplats.com';
|
||||
|
||||
const useProdServer = process.env.EXPO_PUBLIC_USE_PROD_SERVER === 'true';
|
||||
|
||||
export const config = {
|
||||
apiBaseUrl: useProdServer ? PROD_API_URL : DEV_API_URL,
|
||||
wsBaseUrl: useProdServer ? PROD_WS_URL : DEV_WS_URL,
|
||||
isDebugMode: __DEV__,
|
||||
|
||||
api: {
|
||||
timeoutMs: 30_000,
|
||||
refreshPath: '/api/auth/refresh',
|
||||
},
|
||||
|
||||
ws: {
|
||||
reconnectMaxRetries: 10,
|
||||
reconnectBaseDelayMs: 1_000,
|
||||
reconnectMaxDelayMs: 30_000,
|
||||
heartbeatIntervalMs: 30_000,
|
||||
},
|
||||
} as const;
|
||||
Reference in New Issue
Block a user