-
-
Notifications
You must be signed in to change notification settings - Fork 140
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
Firebase Local Emulator #256
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work!! I haven't tested this because I haven't downloaded everything
- Make sure Node v 8.0 or higher is installed
- Make sure Openjdk v 11 or higher is installed (If you installed it via brew, don't forget to add the executable to $PATH, brew will output it as a handy command to execute for you)
- Make sure firebase-cli is installed (npm install -g firebase-tools)
Can you note the best way to download these? (Preferably with Homebrew) Also I have a few questions, you can comment directly in that thread
<CommandLineArguments> | ||
<CommandLineArgument | ||
argument = "-useEmulator YES" | ||
isEnabled = "YES"> | ||
</CommandLineArgument> | ||
</CommandLineArguments> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When would this flag need to be enabled vs disabled? Only when wanting to use the emulator? Otherwise it would be unchecked, which would default to using the real project?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes exactly
let useEmulator = UserDefaults.standard.bool(forKey: "useEmulator") | ||
if useEmulator { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why use UseDefaults, as opposed to the command line argument?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honestly I don't have a better answer to that question than "Because Peter recommended it doing it like that in his article" But I guess it could also be done via command line arguments, if you prefer that :)
The best way to install all the requirements is indeed via homebrew:
With that all prerequisites should be installed. Let me know if anything doesn't work |
Thanks so much for all the help on this! I'm finally getting around to implementing it I'm going to close your PR because I'm working on this on a separate branch, because I'm also updating a few other things. Your steps were super helpful to finally get this running! |
What it Does
How I Tested
npm install -g firebase-tools
)firebase login
and authenticated successfullybackend/Basic-Car-Maintenance
and runfirebase emulators:start
Notes
Screenshot