mjgartendev
5/24/2018 - 11:05 PM

Template to add firebase connection settings to vue project

Template to add firebase connection settings to vue project from https://www.smashingmagazine.com/2018/04/vuejs-firebase-firestore/

// Copied/simplified from https://www.smashingmagazine.com/2018/04/vuejs-firebase-firestore/ 
// by https://www.smashingmagazine.com/author/lukas-van-driel
// 1. npm install firebase
// 2. insert this snippet in your Vuex root
import Vue from 'vue';
import firebase from 'firebase/app';
import 'firebase/firestore';

// Copy this from the cloud console "add to web app" settings
var config = {
  apiKey: "",
  authDomain: "",
  databaseURL: "",
  projectId: "",
  storageBucket: "",
  messagingSenderId: ""
};
firebase.initializeApp(config);

// The shared state object that any vue component can get access to. 
export const store = {
  currentUser: null
};