Created
September 28, 2022 08:54
-
-
Save vaibhavgehani/3872b1cad34b91c7e804bba45d1b2e65 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_project_key>", | |
| authDomain: "<your_project_key>", | |
| projectId: "<your_project_key>", | |
| storageBucket: "<your_project_key>", | |
| messagingSenderId: "<your_project_key>", | |
| appId: "<your_project_key>", | |
| measurementId: "<your_project_key>" | |
| }; | |
| // 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