Can we use `service` bindings with

Can we use service bindings with getRequestContext()? I am trying to add it in wrangler.toml but it is undefined.
3 Replies
Dario
Dario•5mo ago
Yes, you can use service bindings 🙂 Where are you seeting the undefined? locally? or in production? (or both?) because locally you need to spin up the worker with wrangler dev in order for it to get connected to the Next.js application (it's all local, there's no remote connecting to workers) and remotely you need to setup the binding in the dashboard (https://dash.cloudflare.com/?to=/:account/pages/view/:pages-project/settings/functions#service_bindings_section)
Deo Kumar
Deo Kumar•5mo ago
Oh, thank you. I was thinking that it can connect to remote workers.
Dario
Dario•5mo ago
no sorry 🥲