Skip to content
Advertisement

Tag: google-cloud-functions

Vue + Firebase: Functions useEmulator() ignored

I found this line of code in the Firebase docs firebase.functions().useEmulator(‘localhost’, 5001) that supposedly points your Vue app to the locally running emulator, but for some reason my project is ignoring said line of code and continues to call the remotely deployed function instead. Here’s what the relevant part of my @/plugins/firebase.js looks like: And then to call the botcheck

Why is my function saying that a promise isn’t being handled correctly?

New to Typescript. Wrote this function but I can’t figure out why it’s giving the error below. I commented the 2 lines that the errors are pointing to. 48:9 error Promises must be handled appropriately or explicitly marked as ignored with the void operator @typescript-eslint/no-floating-promises 61:9 error Promises must be handled appropriately or explicitly marked as ignored with the void

Change fields of documents in a collection Firestore periodically – Cloud Functions

I have a database structure like this: Posts(collection) -> userID (document) -> Subposts (subcollection) -> document[isVisible: true] We have different userIDs which means that each userID has a subcollection of different posts. I want to set up a cloud function which periodically (every 2 minutes) checks all the documents in all the sub collections (Subposts) and if the field isVisible

Cloud Function to Update a Record (value = value + newValue) whenever a value chages in Firebase Databse

I am new to Cloud Functions. I have a table ‘drivers’ with having few details. Now I want to write a Firebase Cloud Function which will trigger whenever the value in ‘drivers/{driverId}/history/{rideId}/rating’ is set. Update totalRating (drivers/{driverId}/totalRating) value to oldTotalRatingValue + NewTotalRatingValue. Any help or a reference would be appreciated. Thanks in Advance. =============My Approach====================== but my var oldRating doesn’t

Firebase Functions and API Keys

Are Firebase functions a safe place to store API keys for a React App? As an example, see the following template for an axios API call in a Firebase Cloud function: cloud function template edit: added text code snippet. The question whether or not it is secure to store the API key directly in this snippet, given it’s a firebase

Advertisement