Shihmin Lee
Shihmin Lee
CDCloudflare Developers
Created by Shihmin Lee on 5/24/2024 in #pages-help
service bindings does not work
Locally I can do
npm create cloudflare@latest -- web --type web-framework
npm create cloudflare@latest -- web --type web-framework
to create a website using qwik framework. I also have
[[services]]
binding = "SOMETHING"
service = "worker-something"
[[services]]
binding = "SOMETHING"
service = "worker-something"
in my wrangler.toml. In my index.ts I have
export const onRequest = async (context: any) => {
const result = await context.platform.env.TICKERS.fetch('...')
console.log({result})
}
export const onRequest = async (context: any) => {
const result = await context.platform.env.TICKERS.fetch('...')
console.log({result})
}
but I cannot seem to connect to the other worker as I always get 503. I wonder if anyone knows how to get around this.
2 replies