Node.js-like firebase module for Parse cloud code

I'm trying to integrate Firebase with Parse to add real-time capabilities to my application. However, some API functions (like the ability to limit queries to Firebase with limit() or startAt()/endAt()) are not available with the firebase REST API.

They are available with the Node.js module, but even though Parse Cloud support CommonJS-like modules, I'm not sure it's possible to integrate the Firebase node module without some major tweaking.

Any idea how I could access these functions, other than running my own node.js server with the Firebase plugin and using it to redirect my calls to firebase?

It looks like it's possible. What you'll want to do is create a "Cloud Code Module" and wrap the Firebase tools you need. They have a tutorial here

It's pretty standard node.js structures. You put all your Firebase methods into exports, add an initialize method (this is where you'd probably do things like auth?), and you're off.

Wrapping Firebase isn't hard or lengthy. Here's a gist that wraps Firebase in a promise structure, for example. You could basically take the methods from that gist as a blueprint for wrapping them into Parse.

I find it not easy, firebase is dependent on faye-websocket and in its turn requires other libs. We can make it work using "Cloud Code Module" but I don't like adding libs this way.

This is a request for Parse to support node modules, unfortunately the answer is a flat NO from them for now https://parse.com/questions/using-npm-modules-in-cloud-code.

Would appreciate any update on this. Thanks!