feat(whole project): huge changes, huge updates
This commit is contained in:
196 files changed
+9146
-4316
No files matched your search
@@ -0,0 +1,31 @@
|
||||
// Environment configuration
|
||||
const config = {
|
||||
development: {
|
||||
apiBaseUrl: 'http://192.168.18.4:8000',
|
||||
// Add other development-specific settings here
|
||||
},
|
||||
production: {
|
||||
apiBaseUrl: 'https://your-production-api.com',
|
||||
// Add other production-specific settings here
|
||||
},
|
||||
// Add more environments as needed
|
||||
};
|
||||
|
||||
// Get current environment
|
||||
const getEnv = () => {
|
||||
if (__DEV__) return 'development';
|
||||
return 'production';
|
||||
};
|
||||
|
||||
// Get current configuration
|
||||
export const getConfig = () => {
|
||||
return config[getEnv()];
|
||||
};
|
||||
|
||||
// Get API base URL
|
||||
export const getApiBaseUrl = () => {
|
||||
return getConfig().apiBaseUrl;
|
||||
};
|
||||
|
||||
// Export all config
|
||||
export default config;
|
||||
Reference in new issue
Block a user