fforres
fforres
CDCloudflare Developers
Created by fforres on 8/7/2024 in #workers-help
Do RPCs work in localhost? πŸ€”
I imagine this has to be because the way workers need keep references to JS Objects when injecting RPCs? πŸ€” Would be great if some CF folks could give some insight
5 replies
CDCloudflare Developers
Created by fforres on 8/7/2024 in #workers-help
Do RPCs work in localhost? πŸ€”
Unsure if this is documented or not, but that was at least my issue πŸ™
5 replies
CDCloudflare Developers
Created by fforres on 8/7/2024 in #workers-help
Do RPCs work in localhost? πŸ€”
Holy shit! I figured it out my issue. So one extra thing to have in consideration is that methods have to be written as part of the class prototype. Like WORKS
export default class DB extends WorkerEntrypoint {
async method() {
// Prototype method implementation
console.log("Prototype method called and everyone is happy");
}
}
export default class DB extends WorkerEntrypoint {
async method() {
// Prototype method implementation
console.log("Prototype method called and everyone is happy");
}
}
FAILS
export default class DB extends WorkerEntrypoint {
someMethod = async () => {
// Arrow function method implementation
console.log("Arrow function method called");
// This will not be called. The host worker will fail with a message like:
// The RPC receiver does not implement the method someMethod
}
}
export default class DB extends WorkerEntrypoint {
someMethod = async () => {
// Arrow function method implementation
console.log("Arrow function method called");
// This will not be called. The host worker will fail with a message like:
// The RPC receiver does not implement the method someMethod
}
}
5 replies
CDCloudflare Developers
Created by fforres on 8/7/2024 in #workers-help
Do RPCs work in localhost? πŸ€”
I can see the following: β–² [WARNING] This worker is bound to live services: TRANSACTIONAL_EMAIL_SERVICE (transactional-email-service) Which makes me think wrangler does see the bound RPC service. Plus I have set a compatibility_date = "2024-06-03" for both my services (main and the bound RPC).
5 replies
CDCloudflare Developers
Created by SimDoes on 6/14/2024 in #pages-discussions
did you figure this out? I have tried
oh crap 😦
5 replies
CDCloudflare Developers
Created by SimDoes on 6/14/2024 in #pages-discussions
did you figure this out? I have tried
Did you folks found a solution? Been stuck with the same issue for a while. disabled the placements...ensured i'm using an up to date compatibility_date It doesn't work on local
5 replies
CDCloudflare Developers
Created by Web Bae on 7/1/2024 in #workers-help
Service Workers and Typescript
Hey @Web Bae! did you find a solution? πŸ€”
8 replies
CDCloudflare Developers
Created by moonage.dev on 3/2/2023 in #pages-discussions
Nvm see it’s possible in the docs k so
Heyoo, were you able to do custom domain per branches? Wanted to have a "development" branch, deploying to domain.dev and "main" to "domain.com"
2 replies