Spaces:
Sleeping
Sleeping
File size: 1,245 Bytes
0f5ca68 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
// 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 };
|