Programmatically instantiate and modify Firebase instances.
For automated testing, mostly.
npm install --save firebase-admin
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);
});
});
There's JSDoc-generated API documentation.
git clone https://github.com/casetext/firebase-admin
cd firebase-admin
npm install
npm test
Please jshint
. That is all.
- 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.
Big whoop, wanna fight about it?