-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfirebase.config.ts
40 lines (34 loc) · 996 Bytes
/
firebase.config.ts
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
31
32
33
34
35
36
37
38
39
40
/* eslint-disable import/no-unresolved */
import { initializeApp } from "firebase/app";
import { getFirestore, collection } from "firebase/firestore";
import { getAuth } from "firebase/auth";
import { getStorage } from "firebase/storage";
import { getDatabase } from "firebase/database";
import {
API_KEY,
AUTH_DOMAIN,
PROJECT_ID,
STORAGE_BUCKET,
MESSAGING_SENDER_ID,
APP_ID,
TEST_API,
//@ts-ignore
} from "@env";
// Initialize Firebase
const firebaseConfig = {
apiKey: API_KEY,
authDomain: AUTH_DOMAIN,
projectId: PROJECT_ID,
storageBucket: STORAGE_BUCKET,
messagingSenderId: MESSAGING_SENDER_ID,
appId: APP_ID,
};
// Initialize Firebase
const app = initializeApp(firebaseConfig);
const db = getFirestore(app);
const auth = getAuth(app);
const storage = getStorage(app);
const projectsRef = collection(db, "projects");
const chatsRef = collection(db, "chats");
const rtDatabase = getDatabase(app);
export { db, auth, storage, projectsRef,rtDatabase,chatsRef };