Skip to content

Instantly share code, notes, and snippets.

@katopz
Last active August 27, 2015 16:14
Show Gist options
  • Save katopz/2e1d8447feda6297dc50 to your computer and use it in GitHub Desktop.
Save katopz/2e1d8447feda6297dc50 to your computer and use it in GitHub Desktop.
firebase_bridge.js for medium
var Firebase = Meteor.npmRequire("firebase");
var firebase = new Firebase('https://radiant-inferno-foo.firebaseio.com/');
firebase.on('child_added', willLog);
firebase.on('child_changed', willLog);
firebase.on('child_removed', willLog);
function willLog(snapshot) {
console.log(snapshot.key() + " : " + EJSON.stringify(snapshot.val()));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment