Skip to content

Commit

Permalink
Update README.md (#9)
Browse files Browse the repository at this point in the history
- Reference the Neon serverless driver
- Capitalize "Neon Proxy"
- Change the title to reflect that it does not just support connections over HTTP
  • Loading branch information
danieltprice authored Nov 25, 2024
1 parent be09622 commit d41590d
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# Connect to a local PostgreSQL database using the neon http proxy
# Connect to a local PostgreSQL database using the Neon Proxy

This repository contains a Dockerfile to run the neon proxy locally. It basically implements the
steps described in
[neondatabase/serverless/issues/33](https://github.com/neondatabase/serverless/issues/33#issuecomment-1634853042).
This repository contains a Dockerfile to run the Neon Proxy locally, which supports connections over
HTTP or WebSockets using the [Neon Serverless Driver](https://github.com/neondatabase/serverless).
It implements the steps described in
[neondatabase/serverless/issues/33](https://github.com/neondatabase/serverless/issues/33#issuecomment-1634853042) to add support for connections over HTTP.

The proxy uses [localtest.me](https://readme.localtest.me/) to configure the TLS server name and
includes a small [Caddy](https://caddyserver.com/) reverse proxy to setup the upstream connection
via HTTPS so the local code does not need to trust the self-signed certificate of the neon proxy.
via HTTPS so the local code does not need to trust the self-signed certificate of the Neon Proxy.

## Usage

Expand All @@ -16,7 +17,7 @@ The latest version is hosted on the GitHub Container Registry and can be pulled
### Local setup

To use the proxy you need to provide a connection string to a PostgreSQL database. The easiest setup
is to use a `docker-compose.yml` file that starts a PostgreSQL database and the local neon proxy.
is to use a `docker-compose.yml` file that starts a PostgreSQL database and the local Neon Proxy.

```yaml
services:
Expand Down Expand Up @@ -51,7 +52,7 @@ volumes:
db_data:
```
### Connecting to the neon proxy
### Connecting to the Neon Proxy
When using the local proxy you need to add a custom fetchEndpoint function to the neonConfig. The
local proxy listens on `http://db.localtest.me:4444/sql`.
Expand Down

0 comments on commit d41590d

Please sign in to comment.