firebase / firebase-admin-go

Firebase Admin Go SDK
Apache License 2.0
1.12k stars 239 forks source link

fix FIREBASE_DATABASE_EMULATOR_HOST not working #578

Open timesking opened 10 months ago

timesking commented 10 months ago

Like #574 mentioned. FIREBASE_DATABASE_EMULATOR_HOST is not working at all.

the db URL should be http://127.0.0.1:9000?ns=dbname or https://.firebaseio.com

The explanation of FIREBASE_DATABASE_EMULATOR_HOST in doc https://firebase.google.com/docs/emulator-suite/connect_rtdb#admin_sdks, says Format should only be host:port, "127.0.0.1:9000".

With this modification:

When you have FIREBASE_DATABASE_EMULATOR_HOST: 127.0.0.1:9000 in Env You could set your DBUrl to either http://127.0.0.1:9000?ns=dbname or https://.firebaseio.com.

The Go SDK will work as other languages firebase SDK.

lahirumaramba commented 9 months ago

Thank you for your contribution! Please change the base branch to dev before we can start the review process.

https://github.com/firebase/firebase-admin-go/blob/master/CONTRIBUTING.md#want-to-submit-a-pull-request

Make sure to create all your pull requests against the dev branch. All development work takes place on this branch, while the master branch is dedicated for released stable code. This enables us to review and merge routine code changes, without impacting downstream applications that are building against our master branch.