firebase deploy only function
firebase deploy --only functions:functionNameHere
firebase deploy only function
firebase deploy --only functions:functionNameHere
firebase functions add to database
import * as functions from 'firebase-functions';
import * as admin from 'firebase-admin';
admin.initializeApp(functions.config().firebase);
exports.onMsgAdded = functions.database.ref('/users/{uid}/messages/{to_uid}/{msg}').onCreate((snap, context) =>{
const data = snap.val();
const msgRoot = admin.database().ref('/users/' + context.params.to_uid + '/messages/' + context.params.uid);
return msgRoot.set(data);
});
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us