keep listener working javascript firebase code example
Example 1: javascript write to firebase
function writeUserData(userId, name, email, imageUrl) {
firebase.database().ref('users/' + userId).set({
username: name,
email: email,
profile_picture : imageUrl
});
}
Example 2: firebase cloud method update
firebase deploy --only functions:functionNameHere