Skip to content

Instantly share code, notes, and snippets.

@dmcgrath
Created December 15, 2017 03:05
Show Gist options
  • Save dmcgrath/a7796731c6a9553bf2dbf825b0460a20 to your computer and use it in GitHub Desktop.
Save dmcgrath/a7796731c6a9553bf2dbf825b0460a20 to your computer and use it in GitHub Desktop.
Initialize Cloud Firestore
noteId = window.location.hash; // was h
project = "computasbrann-example";
// f = firebase
firebase.initializeApp({
authDomain:project+".firebaseapp.com",
projectId:project
});
var dbClient=null;
var uuid = uuidv4();
firebase.firestore().enablePersistence().then(function(){
dbClient = firebase.firestore();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment