Search
Setup for Free
CD
Cloudflare Developers
Need help understanding D1 database example for binding
Original message was deleted
Cloudflare Developers
Join
Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news
83,498
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
M
mrbot123
•
8/5/24, 1:39 AM
I am trying to understand d1 binding between pages
M
mrbot123
•
8/5/24, 1:40 AM
this link shows the example provided
:
https://developers.cloudflare.com/pages/functions/bindings/
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
…
M
mrbot123
•
8/5/24, 1:40 AM
export async function onRequestGet
(context
)
{
const id
= context
.env
.DURABLE
_OBJECT
.newUniqueId
(
)
;
const stub
= context
.env
.DURABLE
_OBJECT
.get
(id
)
;
/
/ Pass the request down to the durable object
return stub
.fetch
(context
.request
)
;
}
M
mrbot123
•
8/5/24, 1:40 AM
I don
't know what context is suppose to be
M
mrbot123
•
8/5/24, 2:58 AM
actually never mind its a stupid question sorry
Similar Threads
D1 Database Binding Issue
CD
Cloudflare Developers / pages-help
3y ago
Nuxt3 with D1 binding example
CD
Cloudflare Developers / pages-help
2y ago
Use D1 Database without binding
CD
Cloudflare Developers / workers-and-pages-help
3y ago
D1 database binding is visible, R2 binding is {} empty
CD
Cloudflare Developers / pages-help
3y ago