Notes
Realtime Database
Set a ref
function writeUserData(userId, name, email, imageUrl) {
firebase
.database()
.ref('users/' + userId)
.set({
username: name,
email: email,
profile_picture: imageUrl,
});
}Value events
var starCountRef = firebase.database().ref('posts/' + postId + '/starCount');
starCountRef.on('value', function(snapshot) {
updateStarCount(postElement, snapshot.val());
});Multi-path updates
Delete data
Detach listener
Transactions
Child events
Sort data
Filter data
Authenticate Node.js
Initialize Node.js with limited privileges
Last updated