Skip to content

Latest commit

 

History

History
98 lines (64 loc) · 2.83 KB

README.md

File metadata and controls

98 lines (64 loc) · 2.83 KB

I/O Crossword Backend

I/O Crossword

License: MIT

Backend project for I/O Crossword built with Firebase using Genkit for Google I/O Connect Berlin.

Try it now and learn about how it's made.

Built by Very Good Ventures in partnership with Google

You can also check out the frontend built with Flutter in its dedicated GitHub repository.


Getting Started 🚀

To run this, first we need to install Genkit.

npm i -g genkit

Review the documentation for details and samples.

One important step is to set the GOOGLE_GENAI_API_KEY environment variable to your key:

export GOOGLE_GENAI_API_KEY=<your API key>

After installin Genkit, we deploy our flow to Firebase using the following command:

firebase deploy

This will make our flows available to our I/O Crossword Frontend.

Start the Genkit Developer UI 💻

To start the Genkit Developer UI use the following command:

genkit start

Review the documentation for details and samples.

If you want to run this using the Firebase Local Emulator Suite, you should first run the emulators with the following command:

GENKIT_ENV=dev firebase emulators:start --inspect-functions

And then start Genkit in another port (since both Genkit and Emulators use the same default 4000 port) using the following command:

genkit start --attach http://localhost:3100 --port 4001

Running Tests 🧪

To run all Cloud Functions and Security Rules tests, use the following command:

npm run test

If you want to run the Cloud Functions test only, use the following command:

npm run test-cloud-functions

If you want to run the Security Rules test only, use the following command:

npm run test-rules-emulators