Setup#

Install#

npm install @rebased/firebase @rebased/core

Configure#

import 'firebase/auth';
import 'firebase/firestore';
import { install } from '@rebased/firebase';
install({
// grab the config from firebase console
config: {
apiKey: '...',
authDomain: '...',
projectId: '...',
storageBucket: '...',
messagingSenderId: '...',
appId: '...',
measurementId: '...'
}
});

Example#

import { fetch } from '@rebased/core';
fetch('users')
.from('firebase') // can also be firestore
.where('id', '==', 54)
.findOne()
.subscribe(user => console.log(user));