firebase-client
A simple Firebase client for Node.js, based on the firebase gem, by oscardelben.
Installation
npm install firebase-client
Then, in your project require and instantiate the Firebase client:
var FirebaseClient = ;var firebase = url: "https://node-firebase-client.firebaseio.com/" auth: "my-auth-token";
Example Usage
GET
Gets the value of a resource at the specified path. Returns a promise, resolved on a successful HTTP response, or rejected on a client/server error.
firebase;
Example
To get the "example" resource:
firebase;
To get all resources withing your Firebase instance:
firebase;
SET
Set the value of a resource at the specified path. Returns a promise, resolved on a successful HTTP response, or rejected on a client/server error.
firebase;
Example
firebase;
PUSH
Creates a new child resource under the specified path. Returns a promise, resolved on a successful HTTP response, or rejected on a client/server error.
firebase;
Example
firebase;
UPDATE
Updates an existing resource at the specified path. Returns a promise, resolved on a successful HTTP response, or rejected on a client/server error.
firebase;
Example
firebase;
DELETE
Removes resource at specified path. Returns a promise, resolved on a successful HTTP response, or rejected on a client/server error.
firebase;
Example
firebase;
More Info
For more information, check out the Firebase API docs.