-
Notifications
You must be signed in to change notification settings - Fork 3
/
firebase.js
33 lines (27 loc) · 1.02 KB
/
firebase.js
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
import { initializeApp, getApps } from "firebase/app";
import firebase from 'firebase/compat/app';
import { getAuth,createUserWithEmailAndPassword } from "firebase/auth";
import { getFirestore } from "firebase/firestore";
import { getStorage } from "firebase/storage";
import 'firebase/compat/firestore';
import 'firebase/compat/auth';
// Your web app's Firebase configuration
const firebaseConfig = {
apiKey: "AIzaSyB1v6F8vBgmUyCFdHeTnD-7wyUD_pNxMvA",
authDomain: "mykampung-3e569.firebaseapp.com",
projectId: "mykampung-3e569",
storageBucket: "mykampung-3e569.appspot.com",
messagingSenderId: "445198162123",
appId: "1:445198162123:web:d93de29e8d31a89e3aa34e",
storageBucket: "gs://mykampung-3e569.appspot.com",
};
// Initialize Firebase
if (!firebase.apps.length){
firebase.initializeApp(firebaseConfig);
}
// Initialize Firebase
const app = initializeApp(firebaseConfig);
const auth = getAuth();
const db = getFirestore();
const storage = getStorage(app);
export { auth, db , firebase, storage };