added firestore config

This commit is contained in:
2026-02-24 11:37:18 +05:30
parent aec080ba54
commit 190243081a
4 changed files with 229 additions and 2 deletions

View File

@@ -1,5 +1,6 @@
import { initializeApp } from 'firebase/app'
import { getAuth, GoogleAuthProvider } from 'firebase/auth'
import { getFirestore, connectFirestoreEmulator } from 'firebase/firestore'
const firebaseConfig = {
apiKey: import.meta.env.VITE_FIREBASE_API_KEY,
@@ -12,5 +13,15 @@ const firebaseConfig = {
}
const app = initializeApp(firebaseConfig)
// Auth initialization
export const auth = getAuth(app)
export const googleProvider = new GoogleAuthProvider()
// Firestore initialization
export const db = getFirestore(app)
// Enable Firestore emulator in development (uncomment when testing locally)
// if (import.meta.env.DEV) {
// connectFirestoreEmulator(db, 'localhost', 8080)
// }