Skip to content

Instantly share code, notes, and snippets.

@TrevorJTClarke
Created March 8, 2013 02:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TrevorJTClarke/5113769 to your computer and use it in GitHub Desktop.
Save TrevorJTClarke/5113769 to your computer and use it in GitHub Desktop.
Firebase .update() function in Node.js
function setThis () {
firebaseRef.child('users').child(user.name).set(user);
};
data.forEach(function (user) {
module.user(user.name, function(err, data){
firebaseRef.child('users').child(user.name).update(user, setThis());
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment