-
Notifications
You must be signed in to change notification settings - Fork 105
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
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.
Made some changes (more required), and left some questions.
To use Genkit with Firebase emulator start the emulator like this: | ||
|
||
```bash | ||
GENKIT_ENV=dev firebase emulators:start --inspect-functions |
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:
"serve-genkit": "npm run build && GENKIT_ENV=dev GENKIT_REFLECTION_ON_STARTUP_FAILURE=ignore firebase emulators:start --inspect-functions"
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.
To launch the Genkit Dev UI that talks to your code running inside the Firebase Emulator run this command: | ||
|
||
```bash | ||
genkit start --attach http://localhost:3100 --port 4001 |
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.
I have
"genkit-emulator": "GCLOUD_PROJECT=fir-genkit-fundamental-01 && genkit start --attach http://localhost:3100 --port 4444",
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.
In attach mode runtime env var (e.g. GCLOUD_PROJECT
) are not required.
docs/firebase.md
Outdated
genkit start --attach http://localhost:3100 --port 4001 | ||
``` | ||
|
||
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. |
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.
Which Firestore instance, exactly, will the traces be fetched from?
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.
That depends... if you have firestore emulator configured then it will pull from emulated firestore, if not then from prod.
Co-authored-by: Peter Friese <[email protected]>
Co-authored-by: Peter Friese <[email protected]>
Co-authored-by: Kevin Cheung <[email protected]>
Co-authored-by: Kevin Cheung <[email protected]>
Co-authored-by: Kevin Cheung <[email protected]>
No description provided.