Update API base URL to production server; remove dynamic URL handling for cleaner configuration

This commit is contained in:
bobbert committed 2026-04-06 02:02:21 +01:00
1 parent d7bc5d38d1
commit ef514b9c44
1 file changed
+2 -16
+2 -16
View File
@@ -1,19 +1,5 @@
import Constants from 'expo-constants'; //export const API_BASE_URL = 'http://192.168.8.100:3000';
export const API_BASE_URL = 'http://api.bobby.ip-ddns.com';
const getBaseUrl = () => {
// In Expo Go the debuggerHost is "192.168.x.x:8081" — grab the IP
const debuggerHost = Constants.expoGoConfig?.debuggerHost;
if (debuggerHost) {
const ip = debuggerHost.split(':')[0];
return `http://${ip}:3000`;
}
// Fallback for web / production
return 'http://localhost:3000';
};
export const API_BASE_URL = getBaseUrl();
//export const API_BASE_URL = 'http://api.bobby.ip-ddns.com'; // Production server URL
const API = {}; const API = {};
API.get = (endpoint) => callFetch(endpoint, 'GET'); API.get = (endpoint) => callFetch(endpoint, 'GET');