Last active
November 5, 2018 09:16
-
-
Save johnnydecimal/ca096a5f5e259a53134f339d00466082 to your computer and use it in GitHub Desktop.
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
// I'll explain what Rebase is for later | |
import Rebase from 're-base'; | |
// Note we import from 'firebase/app' not just 'firebase'. This avoids a nagging console | |
// warning ("It looks like you're using the development build of the Firebase JS SDK.") | |
import firebase from 'firebase/app'; | |
// Similarly, on line 15 we need the database module, so that's exactly what we specify here. | |
require('firebase/database'); | |
const firebaseApp = firebase.initializeApp({ | |
apiKey: 'your-api-key-here', | |
authDomain: 'your-domain.firebaseapp.com', | |
databaseURL: 'https://your-domain.firebaseio.com', | |
}); | |
const base = Rebase.createClass(firebaseApp.database()); | |
export { firebaseApp }; | |
export default base; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment