Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for using Firebase Emulator #129

Merged
merged 18 commits into from
Nov 11, 2020
Merged

Conversation

mikkopaderes
Copy link
Owner

This PR adds support for using the Firebase Emulator introduced in Firebase v8.0.0. To set it up, in your config/environment.js, you need to set:

let ENV = {
  ...

  'ember-cloud-firestore-adapter': {
    emulator: {
      hostname: 'localhost',
      port: 8080
    },
  },

  ...
}

Feel free to use a different hostname and port depending on your setup.

Aside from the changes above, this addon itself is now setup to utilize Firebase Emulator for local development and testing.

@mikkopaderes mikkopaderes self-assigned this Nov 7, 2020
@mikkopaderes mikkopaderes changed the title Add support for using Firebase Emulator [WIP] Add support for using Firebase Emulator Nov 8, 2020
@mikkopaderes
Copy link
Owner Author

Firebase Emulator is failing in Travis. I dunno why... 😕

@conormag
Copy link

conormag commented Nov 9, 2020

Took a while but I think i got to the bottom of it. I think you're working in a windows environment? It looks like the filepaths in the emulator-data/firestore_export.overall-export-metadata have backslashes for part of the path. I used the method here firebase/firebase-tools#2421 to generate a new emulator-data folder and it no longer crashes although the tests fail

@mikkopaderes
Copy link
Owner Author

Took a while but I think i got to the bottom of it. I think you're working in a windows environment? It looks like the filepaths in the emulator-data/firestore_export.overall-export-metadata have backslashes for part of the path. I used the method here firebase/firebase-tools#2421 to generate a new emulator-data folder and it no longer crashes although the tests fail

Woah, thanks for looking into it. Hmm, so this means that my emulator-data wouldn't work on non-Windows machine. Well that's a let down. I hope they manage to fix the bug soon.

Also, I didn't quite understand the instructions in this. What's the previous dir he's talking about?

@conormag
Copy link

conormag commented Nov 9, 2020 via email

@mikkopaderes mikkopaderes changed the title [WIP] Add support for using Firebase Emulator Add support for using Firebase Emulator Nov 11, 2020
@mikkopaderes mikkopaderes merged commit 84f40b0 into master Nov 11, 2020
@mikkopaderes mikkopaderes deleted the use-firebase-emulator branch November 11, 2020 05:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants