-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfirebase.ts
More file actions
24 lines (19 loc) · 785 Bytes
/
firebase.ts
File metadata and controls
24 lines (19 loc) · 785 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import { getApp, getApps, initializeApp } from 'firebase/app'
import { getAuth } from 'firebase/auth'
import { getFirestore } from 'firebase/firestore'
import { getFunctions } from 'firebase/functions'
// Your web app's Firebase configuration
const firebaseConfig = {
apiKey: "AIzaSyCpHsdQPW2Aukqyf1SRv9ewpcOmyDf7J8M",
authDomain: "chat-flex-3beff.firebaseapp.com",
projectId: "chat-flex-3beff",
storageBucket: "chat-flex-3beff.appspot.com",
messagingSenderId: "324591442708",
appId: "1:324591442708:web:983ecc238a8fd6767f0001"
};
//initialize firebase only once
const app = getApps?.length ? getApp() : initializeApp(firebaseConfig)
const auth = getAuth(app)
const db = getFirestore(app)
const functions = getFunctions(app)
export {db, auth, functions}