Skip to content

Instantly share code, notes, and snippets.

@wcandillon
Last active March 14, 2019 05:52
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 wcandillon/491777f733465c18f5be21420828c10b to your computer and use it in GitHub Desktop.
Save wcandillon/491777f733465c18f5be21420828c10b to your computer and use it in GitHub Desktop.
// @flow
import * as firebase from "firebase";
import "firebase/firestore";
const config = {
apiKey: "AIzaSyD",
authDomain: "react-native.firebaseapp.com",
databaseURL: "https://react-native.firebaseio.com",
projectId: "react-native",
storageBucket: "react-native.appspot.com",
messagingSenderId: "111"
};
export default class Firebase {
static firestore: firebase.firestore.Firestore;
static auth: firebase.auth.Auth;
static storage: firebase.storage.Storage;
static init() {
firebase.initializeApp(config);
Firebase.auth = firebase.auth();
Firebase.firestore = firebase.firestore();
Firebase.storage = firebase.storage();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment