Firebase adapter for js-data.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.github
dist
scripts
src 3.0.0 (#36) Aug 24, 2017
.babelrc
.gitignore
.mailmap upgraded adapter to v3 May 2, 2016
AUTHORS
CHANGELOG.md
CONTRIBUTORS
LICENSE
README.md
bower.json
bs.jpg
circle.yml 3.0.0 (#36) Aug 24, 2017
conf.json
config.default.js
karma.conf.js
karma.start.js
mocha.start.js
package-lock.json
package.json
rollup.config.js
typings.json
yarn.lock

README.md

js-data logo

js-data-firebase

Slack NPM Tests Downloads Coverage

Tested on IE9, Chrome 46, Firefox 41 & Safari 7.1 using bs logo

A Firebase adapter for the JSData Node.js ORM.

Installation

npm install --save js-data js-data-firebase firebase

Usage (Browser)

import { FirebaseAdapter } from 'js-data-firebase';

window.firebase.initializeApp({
  apiKey: window.API_KEY,
  authDomain: window.AUTH_DOMAIN,
  databaseURL: window.DATABASE_URL
});

// Create an instance of FirebaseAdapter
const adapter = new FirebaseAdapter({
  db: window.firebase.database()
});

// Other JSData setup hidden

// Register the adapter instance
store.registerAdapter('firebase', adapter, { default: true });

Usage (Node.js)

import firebase from 'firebase';
import { FirebaseAdapter } from 'js-data-firebase';

firebase.initializeApp({
  databaseURL: process.env.DATABASE_URL,
  serviceAccount: process.env.KEY_FILENAME || 'key.json'
});

// Create an instance of FirebaseAdapter
const adapter = new FirebaseAdapter({
  db: firebase.database()
});

// Other JSData setup hidden

// Register the adapter instance
store.registerAdapter('firebase', adapter, { default: true });

JSData + Firebase Tutorial

Start with the JSData + Firebase tutorial or checkout the API Reference Documentation.

Need help?

Please post a question on Stack Overflow. This is the preferred method.

You can also chat with folks on the Slack Channel. If you end up getting your question answered, please still consider consider posting your question to Stack Overflow (then possibly answering it yourself). Thanks!

Want to contribute?

Awesome! You can get started over at the Contributing guide.

Thank you!

License

The MIT License (MIT)

Copyright (c) 2014-2017 js-data-firebase project authors