Last active
October 3, 2022 14:13
-
-
Save vaibhavgehani/7f791983da920cb1e0216490be5086a7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { initializeApp } from 'firebase/app'; | |
import { initializeFirestore } from 'firebase/firestore' | |
import { getAuth } from "firebase/auth"; | |
const firebaseConfig = { | |
apiKey: "<your_firebase_project_value>", | |
authDomain: "<your_firebase_project_value>", | |
projectId: "<your_firebase_project_value>", | |
storageBucket: "<your_firebase_project_value>", | |
messagingSenderId: "<your_firebase_project_value>", | |
appId: "<your_firebase_project_value>", | |
measurementId: "<your_firebase_project_value>" | |
}; | |
// app instance | |
const app = initializeApp(firebaseConfig); | |
// auth instance | |
const auth = getAuth(app); | |
// db instance (firestore) | |
const db = initializeFirestore(app, {experimentalForceLongPolling: true}); | |
// using app and db in other files | |
export { | |
app, | |
db, | |
auth | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment