Replies: 1 comment 1 reply
-
This is a very good idea! Feel free to give it a shot as I have other things to focus on right now. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was taking a look at the way Vuefire detects and connects to the Firebase emulators:
vuefire/packages/nuxt/src/module/emulators.ts
Line 55 in cab2e95
firebase.json
file to see which emulators should be enabled. However, I believe there is a better option.firebase.json
and the env variables just tell the emulator suite the desired ports. While most of the services will shutdown if the port is unavailable, not all do:The firebase emulator hub offers a REST API to query the running emulators and get back the actual host and port in use. I think this would be a more robust solution.
We could simply fetch this endpoint, and capture the host and ports from it. A rough example below:
I've been using this in my testing to connect to the emulators and it works fine. Just thought I'd post this idea to get your thoughts.
Beta Was this translation helpful? Give feedback.
All reactions