-
Notifications
You must be signed in to change notification settings - Fork 0
/
environment.js
42 lines (39 loc) · 1.48 KB
/
environment.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// https://stackoverflow.com/questions/66665969/expo-app-environments-for-dev-uat-and-production
import Constants from 'expo-constants';
const ENV = {
dev: {
FirebaseConfig: {
apiKey: 'AIzaSyCAn6bViRobzNBEvfANu8eFEqBji3_KE7E',
authDomain: 'cestascooperflorabarao-dev.firebaseapp.com',
databaseURL: 'https://cestas-cooperflora-dev.firebaseio.com',
projectId: 'cestascooperflorabarao-dev',
storageBucket: 'cestascooperflorabarao-dev.appspot.com',
messagingSenderId: '384118273017',
appId: '1:384118273017:web:046a319cf0b479f7d2c328',
},
},
prod: {
FirebaseConfig: {
apiKey: 'AIzaSyAKufHFIlzA2k26_PO4Yfx03pUqtfLHAKw',
authDomain: 'cestascooperflorabarao.firebaseapp.com',
databaseURL: 'https://cestas-cooperflora-barao.firebaseio.com',
projectId: 'cestascooperflorabarao',
storageBucket: 'cestascooperflorabarao.appspot.com',
messagingSenderId: '1021764633897',
appId: '1:1021764633897:web:2ac317b9efd23a3306a338',
},
},
};
// const getEnvVars = (env = Constants.manifest.releaseChannel) => {
const getEnvVars = (env = Constants.expoConfig.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__ || env === 'dev') {
console.log('Dev environment');
return ENV.dev;
}
console.log('Prod environment');
return ENV.prod;
};
export default getEnvVars;