-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfirebase.ts
22 lines (19 loc) · 836 Bytes
/
firebase.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Import the functions you need from the SDKs you need
import { getApp, getApps, initializeApp } from "firebase/app";
import { getFirestore } from "firebase/firestore";
// TODO: Add SDKs for Firebase products that you want to use
// https://firebase.google.com/docs/web/setup#available-libraries
// Your web app's Firebase configuration
// For Firebase JS SDK v7.20.0 and later, measurementId is optional
const firebaseConfig = {
apiKey: process.env.FIREBASE_KEY,
authDomain: "notescape-db.firebaseapp.com",
projectId: "notescape-db",
storageBucket: "notescape-db.firebasestorage.app",
messagingSenderId: "602054643967",
appId: "1:602054643967:web:a28a6f834e81493673bcca"
};
// Initialize Firebase
const app = getApps().length === 0 ? initializeApp(firebaseConfig) : getApp();
const db = getFirestore(app);
export { db }