I have a react-native mobile app that uses the firebase web SDK to init firebase:
import firebase from 'firebase';
firebase.initializeApp({
apiKey: ...,
authDomain: ...,
projectId: ...,
databaseURL: ...,
hostingURL: ...,
storageBucket: ...,
});
And then I can call the cloud functions like this:
firebase.functions().httpsCallable('someFunction')(params);
My Goal
What I want is to config my client to connect to the local served cloud functions that is running after I do $ firebase serve
in my command line:
✔ functions: inviteNonuserToCircle: http://localhost:5000/mvp-finli-remote-local/us-central1/inviteNonuserToCircle
✔ functions: inviteUserToCircle: http://localhost:5000/mvp-finli-remote-local/us-central1/inviteUserToCircle
I want to do this so that I can test and iterate my functions quickly in my local without deploying them.
P.S. I've managed to use Postman to test the local running functions with the URLs provided by $ firebase serve
, but I'd like to test them directly with my client app.