3 ms·
> for await (const req of serve({ port: 8000 })) { > req.respond({ body: "Hello World\n" }); > } It's not the first time I see js iterators used and abused t
by golergka 7y ago
> for await (const req of serve({ port: 8000 })) {
> req.respond({ body: "Hello World\n" });
> }
It's not the first time I see js iterators used and abused this way, and every time I feel that js and it's users are ready for full-blown monads and do notation instead.