cloudflare-docs icon indicating copy to clipboard operation
cloudflare-docs copied to clipboard

Hyperdrive: Mention Node.js compatibility in Tutorial

Open kunalmodi opened this issue 1 year ago • 1 comments

Which Cloudflare product does this pertain to?

Hyperdrive

Existing documentation URL(s)

https://developers.cloudflare.com/hyperdrive/get-started/#5-run-a-query-against-your-database

What changes are you suggesting?

I got stuck on the Getting Started section initially due to Node.JS issues (wrangler wouldn't compile, and I googled a bunch)

It turns out the solution was in this document: https://developers.cloudflare.com/workers/tutorials/postgres/#enable-nodejs-compatibility (adding node_compat = true to my wrangler.toml)

I would suggest adding that note to the Hyperdrive doc as well

Additional information

No response

kunalmodi avatar Feb 16 '24 02:02 kunalmodi

Thanks for the feedback, @kunalmodi . Where would you expect to see that information?

For context, it is in the example wrangler.toml snippet provided in section 4 of the page, although it could potentially be called out more prominently: https://developers.cloudflare.com/hyperdrive/get-started/#4-bind-your-worker-to-hyperdrive

a-robinson avatar Feb 16 '24 14:02 a-robinson