Hey team, is it possible to use
Hey team, is it possible to use Hyperdrive directly from Pages rather than through Workers? Or are there plans for this in the future?
For context, we are connecting to our
pg
DB directly from Pages now, as shown possible in this recent announcement here: https://blog.cloudflare.com/more-npm-packages-on-cloudflare-workers-combining-polyfills-and-native-code/
But we were wondering if we could also leverage Hyperdrive.6 Replies
npm
pg
PostgreSQL client - pure javascript & libpq with the same API. Latest version: 8.13.0, last published: a day ago. Start using pg in your project by running
npm i pg
. There are 10093 other projects in the npm registry using pg.Yes, we're using
pg
I don't have the bandwidth to get too deep on this right now, but things I can say for sure:
* Others in this discord have gotten Hyperdrive working through Pages, though it may not be the best DX ever, right now.
* We do intend to improve this experience overall, though the actual announcements are not ready to be shared yet.
@AJR can we get any more info on how to get this to work?
Team just put together some updated docs on Hyperdrive on Pages. It's not merged in yet, here's the PR: https://github.com/cloudflare/cloudflare-docs/pull/17386/files
GitHub
Add section in Pages Functions Bindings page describing how to use ...
Summary
Add a small section outlining how to use Hyperdrive config bindings with Pages Functions.
Documentation checklist
The documentation style guide has been adhered to.
If a larger change -...
Cloudflare Docs
Bindings | Cloudflare Pages docs
A binding enables your Pages Functions to interact with resources on the Cloudflare developer platform. Use bindings to integrate your Pages Functions with Cloudflare resources like KV, Durable Objects, R2, and D1. You can set bindings for both production and preview environments.