Spaces:
Sleeping
Sleeping
| // Import the functions you need from the SDKs you need | |
| import { initializeApp } from "firebase/app"; | |
| import { getFirestore } from "firebase/firestore"; | |
| // IMPORTANT: Firebase Configuration | |
| // This file requires environment variables to be set up properly. | |
| // Please create a .env file in the root directory with your Firebase credentials. | |
| // See .env.example for the required variables. | |
| // | |
| // WARNING: The default placeholder values will cause runtime errors if Firebase is used. | |
| // Make sure to replace them with your actual Firebase project configuration. | |
| const firebaseConfig = { | |
| apiKey: import.meta.env.VITE_FIREBASE_API_KEY || "your-api-key", | |
| authDomain: import.meta.env.VITE_FIREBASE_AUTH_DOMAIN || "your-auth-domain", | |
| projectId: import.meta.env.VITE_FIREBASE_PROJECT_ID || "your-project-id", | |
| storageBucket: import.meta.env.VITE_FIREBASE_STORAGE_BUCKET || "your-storage-bucket", | |
| messagingSenderId: import.meta.env.VITE_FIREBASE_MESSAGING_SENDER_ID || "your-messaging-sender-id", | |
| appId: import.meta.env.VITE_FIREBASE_APP_ID || "your-app-id", | |
| }; | |
| // Initialize Firebase | |
| const app = initializeApp(firebaseConfig); | |
| // Initialize Cloud Firestore and get a reference to the service | |
| const db = getFirestore(app); | |
| export { db }; | |