-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(db-vercel-postgres): allow to use a local database using
pg
in…
…stead of `@vercel/postgres` (#9771) ### What? This PR allows you to use a local database when using `vercelPostgresAdapter`. This adapter doesn't work with them because it requires an SSL connection and Neon's WS proxy. Instead we fallback to using pool from `pg` if `hostname` is either `127.0.0.1` or `localhost`. If you still want to use `@vercel/postgres` even locally you can pass `disableUsePgForLocalDatabase: true` here and you'd have to spin up the DB with a special Neon's Docker Compose setup - https://vercel.com/docs/storage/vercel-postgres/local-development#option-2:-local-postgres-instance-with-docker ### Why? Forcing people to use a cloud database locally isn't great. Not only they are slow but also paid. --------- Co-authored-by: Dan Ribbens <dan.ribbens@gmail.com>
- Loading branch information
1 parent
ed44ec0
commit 41167bf
Showing
4 changed files
with
37 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters