-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfirebase.js
More file actions
39 lines (33 loc) · 1.25 KB
/
firebase.js
File metadata and controls
39 lines (33 loc) · 1.25 KB
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
// Import the functions you need from the SDKs you need
import * as firebase from "firebase";
import "firebase/database";
// import "firebase/firestore";
// import database from "@react-native-firebase/database";
// Subsequent queries will use persistence, if it was enabled successfully
// TODO: Add SDKs for Firebase products that you want to use
// https://firebase.google.com/docs/web/setup#available-libraries
// Your web app's Firebase configuration
const firebaseConfig = {
apiKey: "AIzaSyBkDFaA7Ly7niJj1Efy8qzXQp-g0NAYpYc",
authDomain: "drivia-4412d.firebaseapp.com",
projectId: "drivia-4412d",
databaseURL: "https://drivia-4412d-default-rtdb.firebaseio.com/",
// databaseURL: "https://drivia-4412d.firebaseio.com",
storageBucket: "drivia-4412d.appspot.com",
messagingSenderId: "399439909295",
appId: "1:399439909295:web:b0af78623bcd8eba9c1f5a",
};
// Initialize Firebase
let app;
if (firebase.apps.length === 0) {
app = firebase.initializeApp(firebaseConfig);
} else {
app = firebase.app();
}
// const database = firebase.firestore();
const database = firebase.database();
const auth = firebase.auth();
const storage = firebase.storage();
// database.enablePersistence();
// database.setPersistenceEnabled(true);
export { auth, database, storage };