grocery-app/Customer App/environment.js.example

46 lines
1.3 KiB
Plaintext
Raw Normal View History

2022-12-21 09:56:47 +00:00
/*****************************
* environment.js
* path: '/environment.js' (root of your project)
******************************/
import Constants from 'expo-constants';
const ENV = {
development: {
GRAPHQL_URL:'' ,
SERVER_URL: '', // put / at the end of server url
IOS_CLIENT_ID_GOOGLE: "",
ANDROID_CLIENT_ID_GOOGLE: "",
FACEBOOK_APP_ID: "",
AMPLITUDE_API_KEY: "",
STRIPE_PUBLIC_KEY: "",
STRIPE_IMAGE_URL: "",
STRIPE_STORE_NAME: ""
},
production: {
GRAPHQL_URL:'' ,
SERVER_URL: '', // put / at the end of server url
IOS_CLIENT_ID_GOOGLE: "",
ANDROID_CLIENT_ID_GOOGLE: "",
FACEBOOK_APP_ID: "",
AMPLITUDE_API_KEY: "",
STRIPE_PUBLIC_KEY: "",
STRIPE_IMAGE_URL: "",
STRIPE_STORE_NAME: ""
}
};
const getEnvVars = (env = Constants.manifest.releaseChannel) => {
// What is __DEV__ ?
// This variable is set to true when react-native is running in Dev mode.
// __DEV__ is true when run locally, but false when published.
if (__DEV__) {
return ENV.development;
} else if (env === 'production') {
return ENV.production;
} else {
return ENV.development;
}
};
export default getEnvVars;