-
-
Notifications
You must be signed in to change notification settings - Fork 72
/
firebase.js
25 lines (21 loc) · 660 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
import firebase from "firebase";
// firebase config
// TODO: move to env
const firebaseConfig = {
apiKey: "AIzaSyBTH2-7uJKbjZ8slbPxaxny5MreXT-djhA",
authDomain: "codehouse-bysavio.firebaseapp.com",
projectId: "codehouse-bysavio",
storageBucket: "codehouse-bysavio.appspot.com",
messagingSenderId: "924657130605",
appId: "1:924657130605:web:2004acd9d22ab04d117364",
measurementId: "G-X6FCVKT31X",
};
if (!firebase.apps.length) {
firebase.initializeApp(firebaseConfig);
} else {
firebase.app(); // if already initialized, use that one
}
// using db and auth
const auth = firebase.auth;
const db = firebase.firestore();
export { db, auth };