-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfirebase.js
34 lines (28 loc) · 940 Bytes
/
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
34
import * as firebase from 'firebase';
import "firebase/firestore";
import "firebase/auth";
// const firebaseConfig = {
// apiKey: "AIzaSyB_O1bE9Sg4YqZkn_OMhFVaRJEwLNg2F5o",
// authDomain: "invest-startup.firebaseapp.com",
// projectId: "invest-startup",
// storageBucket: "invest-startup.appspot.com",
// messagingSenderId: "12054344704",
// appId: "1:12054344704:web:3032209163e6e5d26c54e5"
// };
const firebaseConfig = {
apiKey: "AIzaSyAOZYuK_PsmWU_tgI28fru3lUuFs-YBac0",
authDomain: "invest-app-cb1f1.firebaseapp.com",
projectId: "invest-app-cb1f1",
storageBucket: "invest-app-cb1f1.appspot.com",
messagingSenderId: "151518430144",
appId: "1:151518430144:web:6416e0a6a06cd723cb3e25"
};
let app;
if(firebase.apps.length===0){
app=firebase.initializeApp(firebaseConfig);
}else{
app=firebase.app();
}
const db=app.firestore();
const auth=firebase.auth();
export {db , auth};