Created
June 28, 2018 13:12
-
-
Save jackabox/1c4e0165a670c38af722e87ec9aa8f89 to your computer and use it in GitHub Desktop.
firebase switch config based on env
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const prodConfig = { | |
apiKey: YOUR_API_KEY, | |
authDomain: YOUR_AUTH_DOMAIN, | |
databaseURL: YOUR_DATABASE_URL, | |
projectId: YOUR_PROJECT_ID, | |
storageBucket: '', | |
messagingSenderId: YOUR_MESSAGING_SENDER_ID, | |
} | |
const devConfig = { | |
apiKey: YOUR_API_KEY, | |
authDomain: YOUR_AUTH_DOMAIN, | |
databaseURL: YOUR_DATABASE_URL, | |
projectId: YOUR_PROJECT_ID, | |
storageBucket: '', | |
messagingSenderId: YOUR_MESSAGING_SENDER_ID, | |
} | |
const config = process.env.NODE_ENV === 'production' | |
? prodConfig | |
: devConfig |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment