feat: add API client and services for medicines, pharmacies, auth

This commit is contained in:
Antoni Nuñez Romeu
2026-07-06 11:00:44 +02:00
parent 259bdb1479
commit a5064f2172
5 changed files with 132 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
import Constants from 'expo-constants';
const ENV = {
development: {
API_BASE_URL: 'http://localhost:3001/api',
},
production: {
API_BASE_URL: 'https://your-production-api.com/api',
},
};
const environment = Constants.expoConfig?.extra?.environment || (__DEV__ ? 'development' : 'production');
export const config = {
API_BASE_URL: ENV[environment as keyof typeof ENV]?.API_BASE_URL || ENV.development.API_BASE_URL,
SEARCH_DEBOUNCE_MS: 300,
CACHE_STALE_TIME: 5 * 60 * 1000, // 5 minutes
CACHE_CACHE_TIME: 30 * 60 * 1000, // 30 minutes
};