I'm still not a fan of the async iterator API example for server handlers:
for await (const conn of Deno.listen({ port: 4500 })) {
(async () => {
for await (const { respondWith } of Deno.serveHttp(conn)) {
respondWith(new Response("Hello World"));
}
})();
}
It's hard to reason, and ugly with that async iffe in the middle adding layers of nesting and bf-like `})();` junk.I think the event subscription API is much easier on the eyes and the mind.