Reputation: 19843
I am new to Firebase, I setup a project and using nodejs + nestjs
onCreate
trigger, to duplicate data to another collectionThen I try to run Firebase locally by running npm run serve
which is calling firebase serve --only functions
Then I can access the https function via postman app.
First problem is Firestore onCreate
trigger is not fired locally when I call my local https function.
Second problem is Firestore onCreate
trigger is run on server and I can see running logs, which means in development time, some buggy bad code could be running on server and that code might corrupt data (while the good code is under development and bugs are fixing on my local)
So my question is, how usually people do development on their local and testing?
Upvotes: 1
Views: 948
Reputation: 317467
firebase serve --only functions
only emulates HTTPS functions.
firebase experimental:functions:shell
works with everything else, but you have to construct stub data to send to it.
See the documentation for more information:
Upvotes: 2