News for hackers. Stuff that matters.
Re:Bunny DNS – A scriptable DNS platform by kentonv on Wednesday March 16, 2022 @11:42AM (#30700188)
> I strongly believe that it'd be way better for their clients if the client could just do `export default async function handleDns(event) { ... }`

I'm the tech lead of Cloudflare Workers and you're absolutely right about this. We actually introduced such a syntax as an option a while back and are encouraging people to move to it:

https://blog.cloudflare.com/workers-javascript-modules/

Your argument is exactly one of the reasons for this. The more general version of the argument is that it enables composability: you can take a Worker implementation and incorporate it into a larger codebase without having to modify its code. This helps for testing (incorporating into a test harness), but also lets you do things like take two workers and combine them into one worker with a new top-level event handler that dispatches to one or the other.

Re:Bunny DNS – A scriptable DNS platform by franciscop on Wednesday March 16, 2022 @12:45PM (#30701100)
Thanks! This article is pretty much what I had in mind and exactly my 500-words argument! I don't know how I missed it. This is def one of the things that made me think Cloudflare Workers were not so polished. Are you hiring? I've got many more ideas where this came from :)
Re:Bunny DNS – A scriptable DNS platform by kentonv on Wednesday March 16, 2022 @01:21PM (#30701525)
Always. Send me an email, kenton at cloudflare.
Re:Bunny DNS – A scriptable DNS platform by dejangp on Thursday March 17, 2022 @02:20AM (#30708207)
We're hiring too. You can help us make this amazing!