auto-commit for 0a3cdff9-26d6-44e6-b6cd-25cf78be1d53

This commit is contained in:
emergent-agent-e1
2025-11-08 17:05:10 +00:00
parent 32ab5e50eb
commit dd3ad08a0b
+24
View File
@@ -0,0 +1,24 @@
// API Configuration
// Single source of truth for backend URL
const getBackendUrl = (): string => {
const url = process.env.EXPO_PUBLIC_BACKEND_URL;
if (!url) {
console.error('⚠️ EXPO_PUBLIC_BACKEND_URL not set! Using fallback.');
return 'http://localhost:8001';
}
console.log('✅ Backend URL:', url);
return url;
};
export const API_BASE_URL = getBackendUrl();
export const API_ENDPOINTS = {
AUTH_SIGNUP: `${API_BASE_URL}/api/auth/signup`,
AUTH_SIGNIN: `${API_BASE_URL}/api/auth/signin`,
AUTH_USER: (userId: string) => `${API_BASE_URL}/api/auth/user/${userId}`,
VERIFY_TURNSTILE: `${API_BASE_URL}/api/verify-turnstile`,
BALANCE: `${API_BASE_URL}/api/blockchain/balance`,
};