forked from bentohset/thriftr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
firebase.js
38 lines (32 loc) · 1.25 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
34
35
36
37
38
// Import the functions you need from the SDKs you need
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';
import 'firebase/compat/storage';
//import * as admin from "firebase-admin";
// 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: "AIzaSyBG_y75XhBiOZUnqnPL1AQ6E6U7EqjQIjI",
authDomain: "thriftr-1e99d.firebaseapp.com",
projectId: "thriftr-1e99d",
storageBucket: "thriftr-1e99d.appspot.com",
messagingSenderId: "281048744585",
appId: "1:281048744585:web:53c41a16ee2d8577697c58",
storageBucket: 'gs://thriftr-1e99d.appspot.com',
};
if (!firebase.apps.length){
firebase.initializeApp(firebaseConfig);
}
//require('dotenv').config
// Initialize Firebase
const app = initializeApp(firebaseConfig);
const auth = getAuth();
const db = getFirestore();
const storage = getStorage(app);
export { auth, db , firebase, storage};