Created
August 8, 2019 21:51
-
-
Save eezis/121e08feb8f19ba9034b16581410351c to your computer and use it in GitHub Desktop.
quasar firebase & vuefire boot file
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 { firestorePlugin } from 'vuefire' | |
import { firebase } from '@firebase/app' | |
import 'firebase/firestore' | |
import 'firebase/auth' | |
import firebaseConfig from '../../firebaseConfig' | |
let firebaseApp = firebase.initializeApp(firebaseConfig) | |
let firebaseAuth = firebaseApp.auth() | |
const db = firebaseApp.firestore() | |
export default async ({ app, router, Vue, store }) => { | |
// instantiate vuefire for firestore | |
Vue.use(firestorePlugin) | |
// enable the use of this.$firestore syntax | |
Vue.prototype.$firestore = firebase.firestore() | |
Vue.prototype.$firebaseAuth = firebaseAuth | |
} | |
export { firebaseAuth, db } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment