Prerequisites:
- Firebase SDK: ^7.21.1
I'm trying to connect my Vue.js Frontend with the local firebase functions emulator located at localhost:5001
. I am struggling to determine which configuration properties need to be set in order to access the emulator endpoint.
Below is my current configuration:
const firebaseConfig = {
apiKey: "AIzaSyCKvB9ZluNGOP4s4r8igflwuK-9WVsoThg",
authDomain: "company-29f5c.firebaseapp.com",
databaseURL: "https://company-29f5c.firebaseio.com",
projectId: "company-bar",
storageBucket: "company-29f5c.appspot.com",
messagingSenderId: "1051704079600",
appId: "1:1051704079600:web:f99d362c43b87346",
notificationWebhookUrl: "http://localhost:5001/company-dev/us-central1/notificationsMixpanelWebhook",
cloudFunctionBaseUrl: "http://localhost:5001/company-dev/us-central1",
};
I attempted to update the cloudFunctionBaseUrl
property, assuming it was responsible for changing the functions endpoint URL. Despite setting it to localhost:5001/...
, the app continued to call this URL:
https://us-central1-company-bar.cloudfunctions.net
I realized that the URL is constructed using the projectId
property instead of being overwritten by the cloudFunctionBaseUrl
.
How can I modify the composed URL from:
https://us-central1-company-bar.cloudfunctions.net
to:
http://localhost:5001/company-dev/us-central1
I expected there to be a configuration flag like enableEmulator
, but could not find any reference to it in the documentation.