Skip to content

Instantly share code, notes, and snippets.

@m3l1nd4
Last active April 2, 2021 02:38
Show Gist options
  • Save m3l1nd4/8eeed192f99839590f5f75fe100110a4 to your computer and use it in GitHub Desktop.
Save m3l1nd4/8eeed192f99839590f5f75fe100110a4 to your computer and use it in GitHub Desktop.
let db = null;
let useDatabaseApi = false;
// Firebase configuration and initialization
const initFirebase = () => {
// You can copy-paste the whole firebase Config function from the
// Firebase Project Preview Settings, after you set up the project
const firebaseConfig = {
apiKey: "PUT_YOUR_KEY_HERE",
authDomain: "YOUR_AUTH_DOMAIN",
projectId: "YOUR_PROJECT_ID",
storageBucket: "PROJECT_STORAGE_BUCKET",
messagingSenderId: "YOUR_MESSAGING_SENDER_ID",
appId: "YOUR_APP_ID",
measurementId: "YOUR_MEASUREMENT_ID"
};
firebase.initializeApp(firebaseConfig);
db = firebase.firestore();
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment