-
Notifications
You must be signed in to change notification settings - Fork 139
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
Added firebase emulator instructions #100
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
bd645b9
Added firebase emulator instructions
pavelgj f9b8c29
Update docs/firebase.md
pavelgj 6a1e1c9
Update docs/firebase.md
pavelgj 91bfd9a
Update docs/firebase.md
pavelgj 898e3c9
Update docs/firebase.md
pavelgj 81cc031
Update docs/firebase.md
pavelgj de657e4
Update docs/firebase.md
pavelgj c2ca5dc
format
pavelgj File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -308,3 +308,23 @@ app: | |
Open the web app by visiting the URL printed by the `deploy` command. The app | ||
requires you to sign in with a Google account, after which you can initiate | ||
endpoint requests. | ||
|
||
## Developing using Firebase Local Emulator Suite | ||
|
||
Firebase offers a [suite of emulators for local development](https://firebase.google.com/docs/emulator-suite), which you can use with Genkit. | ||
|
||
To use Genkit with the Firebase Emulator Suite, start the the Firebase emulators like this: | ||
|
||
```bash | ||
GENKIT_ENV=dev firebase emulators:start --inspect-functions | ||
``` | ||
|
||
This will run your code in the emulator and run the Genkit framework in development mode, which launches and exposes the Genkit reflection API (but not the Dev UI). | ||
|
||
Then, launch the Genkit Dev UI with the `--attach` option to connect it to your code running inside the Firebase Emulator: | ||
|
||
```bash | ||
genkit start --attach http://localhost:3100 --port 4001 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In attach mode runtime env var (e.g. |
||
``` | ||
|
||
To see traces from Firestore in the Dev UI you can navigate to the Inspect tab and toggle the "Dev/Prod" switch. When toggled to "prod" it will be loading traces from firestore. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Is this sufficient? I've got the following:
I haven't tried which is the absolute essential number of parameters to make it work...
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.
We made a few changes,
GENKIT_REFLECTION_ON_STARTUP_FAILURE
is not necessary now.