Last active
September 19, 2018 14:15
-
-
Save thaleshcv/8c99d65b583920798354c2558d19d7e7 to your computer and use it in GitHub Desktop.
firebase initialization
This file contains 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
import firebase from 'firebase/app'; | |
import 'firebase/auth'; | |
import 'firebase/database'; | |
// Initialize Firebase | |
const config = { | |
apiKey: process.env.REACT_APP_APIKEY, | |
authDomain: process.env.REACT_APP_AUTHDOMAIN, | |
databaseURL: process.env.REACT_APP_DATABASEURL, | |
projectId: process.env.REACT_APP_PROJECTID, | |
storageBucket: process.env.REACT_APP_STORAGEBUCKET, | |
messagingSenderId: process.env.REACT_APP_MESSAGINGSENDERID | |
}; | |
if (firebase.apps.length === 0) { | |
firebase.initializeApp(config); | |
} | |
export default firebase; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment