JSPM

  • Created
  • Published
  • Downloads 2430051
  • Score
    100M100P100Q249680F
  • License

Programmatically instantiate and modify Firebase instances.

Package Exports

  • firebase-admin

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (firebase-admin) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

firebase-admin

Programmatically instantiate and modify Firebase instances.

Build Status

Why?

For automated testing, mostly.

Install

npm install --save firebase-admin

Use

var FirebaseAccount = require('firebase-admin');
var Firebase = require('firebase');
FirebaseAccount.getToken('user', 'pass')
.then(function(token) {
  var account = new FirebaseAccount(token);
  account.createDatabase('new-instance-name')
  .then(function(instance) {
    var fb = new Firebase(instance.toString());
  })
  .catch(function(err) {
    console.error('Oops, error creating instance:', err);
  });
});

Documentation

There's JSDoc-generated API documentation.

Develop

git clone https://github.com/casetext/firebase-admin
cd firebase-admin
npm install
npm test

Please jshint. That is all.

Caveats

  • This package uses Firebase's own APIs. You can't do anything with it you can't already do in the admin tools and Forge.
  • Do not abuse the Firebase service. It's amazing and the people who work there are amazing.

I 💓 Firebase

Big whoop, wanna fight about it?