Giter VIP home page Giter VIP logo

js-data-firebase's Introduction

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({
  // 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 });

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

js-data-firebase's People

Contributors

chadwithuhc avatar crobinson42 avatar dependabot[bot] avatar jmdobry avatar txchen avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.