-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfirebase.ts
More file actions
22 lines (19 loc) · 786 Bytes
/
firebase.ts
File metadata and controls
22 lines (19 loc) · 786 Bytes
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 { initializeApp } from "firebase/app";
import { getFirestore } from "firebase/firestore";
import { getApps, getApp } from "firebase/app";
// 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
const firebaseConfig = {
apiKey: process.env.apikey,
authDomain: "note-hub-afbf7.firebaseapp.com",
projectId: "note-hub-afbf7",
storageBucket: "note-hub-afbf7.firebasestorage.app",
messagingSenderId: process.env.messagingSenderId,
appId: process.env.appID
};
// Initialize Firebase
const app = getApps().length === 0 ? initializeApp(firebaseConfig) : getApp();
const db = getFirestore(app);
export {db}