Skip to content

What driver i should use for Postgres? #9

Answered by mattddean
Senbonzakura1234 asked this question in Q&A
Discussion options

You must be logged in to vote

You'll definitely need one that supports the Edge Runtime if you want to run everything on the Edge. Typically this requires a database provider which allows you to connect via HTTP rather than with a direct connection. This particular example only works because it uses Planetscale's database.js library, which connects to a PlanetScale HTTP endpoint that handles the translation from HTTP to raw MySQL for you. Vercel Postgres should work. Looks like Neon has an Edge-compatible driver as well. https://neon.tech/docs/serverless/serverless-driver

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Senbonzakura1234
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants