Christer
CDCloudflare Developers
•Created by Christer on 3/26/2024 in #pages-help
Can't get service binding to work when developing locally
I have a page function that has a service binding to another worker (token-service-dev). The binding works fine when page function is deployed, but I can't get it work when developing the page function locally. It looks like it works when runnning the project locally, but the service is always undefined. Is it possible to locally develop a page function and be connected to a live service?
wrangler pages dev -- npx vite --host
✨ Compiled Worker successfully
⛅️ wrangler 3.36.0 (update available 3.37.0)
-------------------------------------------------------
▲ [WARNING] This worker is bound to live services: TokenAuth (token-service-dev)
Your worker has access to the following bindings:
- Services:
- TokenAuth: token-service-dev
2 replies