Skip to content
Merged
Changes from 2 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
48 changes: 48 additions & 0 deletions src/content/docs/hyperdrive/examples/nile.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
type: example
summary: Connect Hyperdrive to a Nile database instance.
pcx_content_type: example
title: Connect to Nile
sidebar:
order: 3
description: Connect Hyperdrive to a Nile database instance.
---

import { Render } from "~/components";

This example shows you how to connect Hyperdrive to a [Nile](https://thenile.dev) PostgreSQL database instance.

Nile is PostgreSQL re-engineered for multi-tenant applications. Nile's virtual tenant databases provides you with isolation,
placement, insights and more for your tenant's data and embedding. You can learn more in [Nile documentation](https://www.thenile.dev/docs/getting-started/whatisnile).

## 1. Allow Hyperdrive access

You can connect Cloudflare Hyperdrive to any Nile database in your workspace using its connection string - either with new set of
credentials or using existing set.

### Nile Console

To get a connection string from Nile Console:

1. Log in to [Nile Console](https://console.thenile.dev) and select a database
2. On the left hand menu, click on "Settings" (the bottom-most icon) and then select "Connection"
3. Click on the elephant, and you'll see a connection string show up.
4. If you want a new pair of credentials for use with Cloudflare Hyperdrive (recommended!), click on "Generate credentials".
5. Copy the connection string without the "psql" part
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
3. Click on the elephant, and you'll see a connection string show up.
4. If you want a new pair of credentials for use with Cloudflare Hyperdrive (recommended!), click on "Generate credentials".
5. Copy the connection string without the "psql" part
3. Select the PostgreSQL logo to show the connection string.
4. Select "Generate credentials" to generate new credentials.
5. Copy the connection string (without the "psql" part).


You'll end up with a connection string similar to this:

```txt
postgres://0191c898-...:[email protected]:5432/my_database
```

With the connection string, you can now create a Hyperdrive database configuration.

## 2. Create a database configuration

<Render file="create-hyperdrive-config" />





Loading