I am writing a Firebase application in JavaScript. I am using Firebase Cloud Functions to implement a server that receives requests for my page routes hosted by Firebase hosting and returns rendered HTML with the https.onRequest method and Express. I am also using Cloud Functions to handle server-side actions with https.onCall methods.
I develop locally using the firebase serve command. When developing locally, my client seems ignores my local onCall functions, instead calling the route for the deployed onCall functions. I am forced to deploy my onCall functions in order to see changes locally. If I do not deploy each change, my local app will not show any changes to onCall functions. This happens whether I run
firebase serveor
firebase serve --only=hosting,functionsWhen run my app locally with firebase serve, the pages are generally hosted at localhost:5000, with my functions locally emulated at localhost:5001. If I call a cloud function on one of these pages, like
firebase.functions().httpsCallable('functionName')and check the Network panel in my developer tools, I can see the Request URL is
instead of
localhost:5001/<app-name>/us-central1/<functionName>where my terminal says the local function is available.
Have I configured something incorrectly? How can I get my locally hosted app to use my locally emulated onCall cloud functions?
--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/0bdd928b-7e42-4fd3-b4dc-57d138f55b1e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.