-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfirebase.js
More file actions
51 lines (48 loc) · 971 Bytes
/
firebase.js
File metadata and controls
51 lines (48 loc) · 971 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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import { initializeApp } from "firebase/app";
import {
getFirestore,
collection,
addDoc,
getDocs,
updateDoc,
doc,
serverTimestamp,
query,
orderBy,
onSnapshot,
} from "firebase/firestore";
import {
getAuth,
createUserWithEmailAndPassword,
updateProfile,
signInWithEmailAndPassword,
signOut,
} from "firebase/auth";
const firebaseConfig = {
apiKey: "AIzaSyBPGCRn0OXuUt5QlFkFKr_AUg8ikMwp4mI",
authDomain: "chat-app-16841.firebaseapp.com",
projectId: "chat-app-16841",
storageBucket: "chat-app-16841.appspot.com",
messagingSenderId: "319337502219",
appId: "1:319337502219:web:eac3a48ae008cef0ed590e",
};
const app = initializeApp(firebaseConfig);
const db = getFirestore(app);
const auth = getAuth(app);
export {
db,
auth,
createUserWithEmailAndPassword,
updateProfile,
signInWithEmailAndPassword,
signOut,
addDoc,
collection,
getDocs,
updateDoc,
doc,
serverTimestamp,
query,
orderBy,
onSnapshot,
};