Tested on IE9, Chrome 46, Firefox 41 & Safari 7.1 using
A Firebase adapter for the JSData Node.js ORM.
npm install --save js-data js-data-firebase firebase
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({
// baseRef: 'users', // optionally set a baseRef root
db: window.firebase.database()
});
// Other JSData setup hidden
// Register the adapter instance
store.registerAdapter('firebase', adapter, { default: true });
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 });
Start with the JSData + Firebase tutorial or checkout the API Reference Documentation.
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!
Awesome! You can get started over at the Contributing guide.
Thank you!
Copyright (c) 2014-2017 js-data-firebase project authors