Is it possible to use D1 with Pages Functions?

Cloudflare docs describe Pages Functions as some kind of interface to use Workers’ features to build API in a Page app, but the code syntax differs a lot.
I’m already using KV in Page Functions, there is info about this in the docs.
But there is no info about using D1 in Page Functions yet.
Is there a way to do this already?

We do have docs: Bindings · Cloudflare Pages docs

You use the exact same way as KV, you bind and access from env

1 Like

Thank you @Walshy, I didn’t see this piece of the docs!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.