Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/content/docs/pages/functions/bindings.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,21 @@ export const onRequest: PagesFunction<Env> = async (context) => {

</TabItem> </Tabs>

### Interact with your Hyperdrive configs locally

You can interact with your Hyperdrive config bindings locally in one of two ways:

- Give you Hyperdrive binding a `localConnectionString` value in your Pages project's `wrangler.toml` file.
- **Recommended** Export the `WRANGLER_HYPERDRIVE_LOCAL_CONNECTION_STRING_<BINDING_NAME>` environment variable with the connection string to your database.

The local runtime will attempt to connect to your database using the connection string you provide with one of the two options above.

:::note

For more information about using Hyperdrive locally, see the [local development configuration guide](/hyperdrive/configuration/local-development/).

:::

## Analytics Engine

The [Analytics Engine](/analytics/analytics-engine/) binding enables you to write analytics within your Pages Function.
Expand Down
Loading