Reputation: 179
Is there a way to deploy a firebase function other than firebase deploy --only functions?
I'm looking for a way to have a user build and deploy a pubsub function client-side.
Example
User adds a weather stations to their account. User selects time interval to ping weather station and record weather data and then deploys this function to run each time interval to catalog the weather data.
Currently, I have to make individual firebase functions for each user, but I'm wondering if there is a way that a user can generate and deploy a function on their own.
Upvotes: 0
Views: 69
Reputation: 600006
To deploy Cloud Functions one has to be a collaborator on the Firebase/GCP project, which is not a feasible solution when you want user-specific Cloud Functions.
A common approach here is to have one (typically callable) Cloud Function that your app calls when the user adds a weather station to their account. In that function you then set up a Cloud Functions trigger through Cloud Tasks, to run at the schedule for that weather station.
For more on this and other options, see:
Upvotes: 1