This is what I am currently doing to connect to a postgres db from within pages using the pg driver
This is what I am currently doing to connect to a postgres db from within pages using the pg driver
1) Create a pages application, for mine I am using Remix.
2) Setup a worker called
3) Setup drizzle with an http proxy in your pages application. The pages app can use a service binding to call the
4) Make requests with drizzle, they will be proxied to your pages worker and your pages worker will use the connection pool from Hyperdrive.
With this setup you can connect to any postgres db.
For email using Amazon SES I was able to get @aws-sdk/client-ses working within a pages handler.
1) Create a pages application, for mine I am using Remix.
2) Setup a worker called
pg-proxy that has a binding to a Hyperdrive instance. Use the Hyperdrive connectionString with the pg driver in the worker.3) Setup drizzle with an http proxy in your pages application. The pages app can use a service binding to call the
pg-proxy worker directly.4) Make requests with drizzle, they will be proxied to your pages worker and your pages worker will use the connection pool from Hyperdrive.
With this setup you can connect to any postgres db.
For email using Amazon SES I was able to get @aws-sdk/client-ses working within a pages handler.

