-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support local postgres, consider pg-cloudflare
?
#18
Comments
pg-cloudflare
?
For now, you can run our WebSocket proxy locally (although this does mean changing some settings on the driver). Gal has blogged about this here: https://gal.hagever.com/posts/running-vercel-postgres-locally It's on my list to see if we can support Cloudflare TCP in the driver too, though. |
Cool, I've got that working, thanks! |
Actually I'll re-open because although things work locally, adding support for Cloudflare |
Sure. Of course, you should also be able to just use |
Is there a way to make the |
@TimoWilhelm Take a look here for instructions on running our proxy locally: #33 (comment) We do have plans to make this easier (e.g. with a Docker image or via the Neon CLI) in the future. And sooner than that, we have plans to allow embedding a http/WebSocket port in the query string part of the connection URL, so that no additional code is needed. |
Just ran into this as well. Until you guys find a better solution would it be possible to improve the error message, pointing you to the documentation about the proxy? |
I would consider this a very high impact improvement for developer experience. It is causing us a lot of friction that our local and test environments no longer work and that we have to ask all of our engineers to resort to frustrating workarounds. neondb is ALMOST a drop-in replacement... once localhost just works, adopting neondb will become more of a no-brainer for startups pg-cloudflare does seem promising so you don't have to force users to install a lot of extra things like Docker |
This no longer works in the current version |
https://www.npmjs.com/package/pg-cloudflare was released 11 days ago. It uses native TCP connections on Cloudflare Workers, since Cloudflare has recently added that capability. https://www.npmjs.com/package/pg
However, this package uses
pg
, which doesn't take advantage of this.Adding support for this will mean I can develop offline (in trains, flights) and improves the testability (e.g. just spin a postgres up to run certain tests).
The text was updated successfully, but these errors were encountered: