Follow these steps to run the backend locally and expose it via ngrok.
- Open two terminal windows or tabs.
- In both terminals, navigate to the project’s server directory: cd path/to/your/project/server
- In the first terminal, start the FastAPI server: uvicorn main:app --host 0.0.0.0 --port 8000
- In the second terminal, run ngrok to expose the local server: ngrok http 8000
- ngrok will display a public forwarding URL (e.g. https://example.ngrok-free.app). Use this URL to access your FastAPI app remotely.
The server expects a .env file with the key value pair GEMINI_API_KEY={YOUR_KEY_HERE}