1import * as firebase from 'firebase'
2
3const firebaseConfig = {
4 apiKey: "AIzaSyC6EDL8gMkZc3GGzGveMqWe5zvAr5DNiL4",
5 authDomain: "blood-components.firebaseapp.com",
6 databaseURL: "https://blood-components.firebaseio.com",
7 projectId: "blood-components",
8 storageBucket: "blood-components.appspot.com",
9 messagingSenderId: "388223113819",
10 appId: "1:388223113819:web:1273570a12add0fedafd7e",
11 measurementId: "G-K6NM078FWD"
12};
13
14// Initialize Firebase
15firebase.initializeApp(firebaseConfig);
16const auth = firebase.auth();
17const db = firebase.firestore();
18
19//initiating references to the databases
20const usersRef = db.collection('users')
21
22// for privileges purposes
23const functions = firebase.functions();
24
25//google provider sign-in
26const googleProvider = new firebase.auth.GoogleAuthProvider();
27
28
29export { firebase, db, auth, functions, googleProvider }
1step : 1 // First install firebase-tools
2npm install firebase-tools -g
3
4step : 2 // login in your gmail account and then create one project.
5
6step : 3 // Then go to your project directory
7firebase login // enter details
8
9step : 4
10npm run build
11
12step : 5
13firebase init
14
15// ? What do you want to use as your public directory? build
16// ? Configure as a single-page app (rewrite all urls to /index.html)? Yes
17// ? Set up automatic builds and deploys with GitHub? No
18// ? File build/index.html already exists. Overwrite? No
19
20step : 6 // your project is now deployed
21firebase deploy
22
23step : 7
24// go to firebase account
25// select your project
26// goto Hoisting
27
1// Using npm
2npm install --save @react-native-firebase/app
3
4# create your firebase android project and follow the steps for implementations.
5# check: https://rnfirebase.io/#generating-android-credentials
6
7
8
9