> For the complete documentation index, see [llms.txt](https://docs.insurgrid.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.insurgrid.com/get-started/05-local-development.md).

# Expose your local endpoint (local development)

When you build on your own machine, your server runs at something like `http://localhost:3000`. That address only exists *on your computer* — InsurGrid's servers can't reach it, and it isn't HTTPS. So webhooks will never arrive while you develop, unless you bridge that gap.

The fix is a **tunnel**: a tool that gives your local server a temporary public HTTPS URL and forwards any request on that URL to `localhost`. This is standard for webhook development — Stripe, GitHub, and every webhook provider expect it.

## Using ngrok (quickest)

1. Install [ngrok](https://ngrok.com/download) and sign up for a free account.
2. Start your local server (say, on port 3000).
3. In a second terminal, run:

   ```bash
   ngrok http 3000
   ```
4. ngrok prints a public HTTPS URL that forwards to your local server:

   ```
   Forwarding   https://a1b2-34-56-78-90.ngrok-free.app -> http://localhost:3000
   ```
5. Copy that `https://…` URL, add your endpoint path, and register it in the dashboard's **API section** as your **staging** webhook URL:

   ```
   https://a1b2-34-56-78-90.ngrok-free.app/hooks/insurgrid
   ```

Now any webhook InsurGrid sends to that URL is forwarded straight to your `localhost` server, and you can set breakpoints and read logs like normal.

## Good to know

* **The URL changes each restart** on the free plan. When you restart ngrok, update the URL in the dashboard. (A paid ngrok plan or a reserved domain gives you a stable URL.)
* **Any tunnel works** — [Cloudflare Tunnel](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/), [localtunnel](https://github.com/localtunnel/localtunnel), or others. ngrok is just the most common.
* **This is for development only.** In production, register your real deployed HTTPS URL instead.
* Inspect what's arriving at ngrok's local dashboard (`http://127.0.0.1:4040`) — handy when debugging.

You're ready. Continue to Quickstart A →


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.insurgrid.com/get-started/05-local-development.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
