Skip to content

Instantly share code, notes, and snippets.

@sambshapiro
Created March 8, 2020 19:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sambshapiro/9260919396d60bfdbc89df1d6940f22a to your computer and use it in GitHub Desktop.
Save sambshapiro/9260919396d60bfdbc89df1d6940f22a to your computer and use it in GitHub Desktop.
Firebase local development with Firestore & Cloud Functions
if (window.location.hostname === 'localhost') {
console.log("testing locally -- hitting local functions and firestore emulators");
firebase.functions().useFunctionsEmulator('http://localhost:5001');
firebase.firestore().settings({
host: 'localhost:8080',
ssl: false
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment