-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathfirebase.js
More file actions
61 lines (57 loc) · 1.31 KB
/
firebase.js
File metadata and controls
61 lines (57 loc) · 1.31 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import {fbConfig} from './env';
import {initializeApp} from 'firebase/app';
import {
getAuth,
createUserWithEmailAndPassword,
signInWithEmailAndPassword,
} from 'firebase/auth';
import {
getStorage,
ref as storageRef,
uploadBytesResumable,
getDownloadURL,
} from 'firebase/storage';
import {
getDatabase,
ref as databaseRef,
set as databaseSet,
onValue as databaseOnValue,
get as databaseGet,
child as databaseChild,
off as databaseOff,
query as databaseQuery,
equalTo,
orderByChild,
} from 'firebase/database';
// TODO: Replace the following with your app's Firebase project configuration
const firebaseConfig = {
apiKey: `${fbConfig.apiKey}`,
authDomain: `${fbConfig.authDomain}`,
projectId: `${fbConfig.projectId}`,
storageBucket: `${fbConfig.storageBucket}`,
messagingSenderId: `${fbConfig.messagingSenderId}`,
appId: `${fbConfig.appId}`,
};
const app = initializeApp(firebaseConfig);
const auth = getAuth(app);
const storage = getStorage(app);
const database = getDatabase(app);
export {
storage,
storageRef,
uploadBytesResumable,
getDownloadURL,
auth,
createUserWithEmailAndPassword,
signInWithEmailAndPassword,
database,
databaseRef,
databaseSet,
databaseOnValue,
databaseGet,
databaseChild,
databaseOff,
databaseQuery,
equalTo,
orderByChild,
};