Last active
February 7, 2018 06:32
-
-
Save artokun/17ef8187be063ef8e7c8c7cbcf6bb34e to your computer and use it in GitHub Desktop.
Bind Firebase to your Vue Instance
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 Vue from 'vue'; | |
import App from './App'; | |
import router from './router'; | |
/* Import the firebase SDK and extend with firestore */ | |
import firebase from 'firebase'; | |
require('firebase/firestore'); | |
/* Paste your firebase configuration below */ | |
const config = { | |
apiKey: 'AIzaSyDNB0VRHot9Z3vxNBvxR9JDFIad2QbAY4Y', | |
authDomain: 'system-builder-d9645.firebaseapp.com', | |
databaseURL: 'https://system-builder-d9645.firebaseio.com', | |
projectId: 'system-builder-d9645', | |
storageBucket: 'system-builder-d9645.appspot.com', | |
messagingSenderId: '521493369838', | |
}; | |
/* Initialize firebase with your configuration */ | |
firebase.initializeApp(config); | |
/* Bind firebase to your Vue instance */ | |
Vue.prototype.$firebase = firebase; | |
Vue.config.productionTip = false; | |
/* eslint-disable no-new */ | |
new Vue({ | |
el: '#app', | |
router, | |
components: { App }, | |
template: '<App/>', | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment