Skip to content

Instantly share code, notes, and snippets.

@eezis
Created August 8, 2019 21:51
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eezis/121e08feb8f19ba9034b16581410351c to your computer and use it in GitHub Desktop.
Save eezis/121e08feb8f19ba9034b16581410351c to your computer and use it in GitHub Desktop.
quasar firebase & vuefire boot file
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