Since Firebase itself is a No SQL database you easily store data as simple JSON documents
{
"users": {
"mchen": {
"friends": { "brinchen": true },
"name": "Mary Chen",
// our child node appears in the existing JSON tree
"widgets": { "one": true, "three": true }
},
"brinchen": { ... },
"hmadi": { ... }
}
}
var ref = new Firebase('https://youKaraoke.firebaseio.com/');
var roomRef = new Firebase("https://youKaraoke.firebaseio.com/room");
{
"rooms": {
"one": {
"name": "room alpha",
"type": "private",
"messages": {
"m1": { "sender": "mchen", "message": "foo" },
"m2": { ... },
}
}
}
}
ref.on("value", function(dataSnapshot) {
console.log(dataSnapshot.val());
});
$ npm install -g firebase-tools
$ firebase init
$ firebase deploy
your-firebase-name.firebaseapp.com