Last active
March 5, 2020 03:38
-
-
Save jsorkin24/552bb37bac3761810fecafbc35efc2a1 to your computer and use it in GitHub Desktop.
firebaseConfig.js for Contact Form
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import firebase from 'firebase/app' // doing import firebase from 'firebase' or import * as firebase from firebase is not good practice. | |
| import 'firebase/auth' | |
| import 'firebase/database' | |
| import 'firebase/firestore'; | |
| import Axios from 'axios' | |
| // Initialize Firebase | |
| let config = { | |
| apiKey: process.env.REACT_APP_FIREBASE_API_KEY, | |
| authDomain: process.env.REACT_APP_FIREBASE_AUTH_DOMAIN, | |
| databaseURL: process.env.REACT_APP_FIREBASE_DATABASE_URL, | |
| projectId: process.env.REACT_APP_FIREBASE_PROJECT_ID, | |
| storageBucket: process.env.REACT_APP_FIREBASE_STORAGE_BUCKET, | |
| messagingSenderId: process.env.REACT_APP_FIREBASE_MESSAGING_SENDER_ID, | |
| } | |
| firebase.initializeApp(config) | |
| const db = firebase.firestore() | |
| export { Axios, db } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment