I need to deploy a node.js server for some complicated business logic.
Is there any firebase library/module which allows me to use promises and not callbacks for the query and update/set methods?
I've found firebase-client, but it is based on REST. Am much prefer one based on the javascript API, if there is one out there?
Thanks.
You're looking for Fireproof.
Fireproof wraps Firebase objects with lightweight promise support.
var Fireproof = require('fireproof'),
Firebase = require('firebase');
var fb = new Firebase('https://test.firebaseio.com/thing'),
fp = new Fireproof(fb);
fireproof.auth('my_auth_token').then(function() {
fp.child('path/to/data').then(...);
}, function(err) {
console.error('Error authenticating to Firebase!');
})
now they have integrated promises in firebase it self. https://www.firebase.com/blog/2016-01-21-keeping-our-promises.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With