Created
March 30, 2019 15:47
-
-
Save Eder87rh/69730982fbc9e9151b1a0e85887bf470 to your computer and use it in GitHub Desktop.
5 - cropchien - configFirebase.js
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
| import firebase from 'firebase/app' | |
| import 'firebase/firestore'; | |
| import 'firebase/messaging'; | |
| import 'firebase/storage'; | |
| const config = { | |
| apiKey: "####", | |
| authDomain: "####", | |
| databaseURL: "####", | |
| projectId: "####", | |
| storageBucket: "####", | |
| messagingSenderId: "####" | |
| } | |
| firebase.initializeApp(config) | |
| // Initialize Cloud Firestore through Firebase | |
| let db = firebase.firestore(); | |
| // Disable deprecated features | |
| db.settings({ | |
| timestampsInSnapshots: true | |
| }); | |
| db.enablePersistence({experimentalTabSynchronization:true}) | |
| const storage = firebase.storage() | |
| const messaging = firebase.messaging() | |
| export default { | |
| db, | |
| storage, | |
| messaging | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment