diff options
author | Andy Hayden <andyhayden1@gmail.com> | 2019-10-28 12:58:35 -0700 |
---|---|---|
committer | Ry Dahl <ry@tinyclouds.org> | 2019-10-28 15:58:35 -0400 |
commit | f484776384ad7df35ab7626b7a673f3902a6cfaa (patch) | |
tree | cb74f31550dc666ec75f5a2f95d61dc69931cb16 /std/http/http_bench.ts | |
parent | 71efe6f2c530d1cb9e8a2679f5778e2c034a9d0d (diff) |
Use top-level for-await in various places (#3217)
Diffstat (limited to 'std/http/http_bench.ts')
-rw-r--r-- | std/http/http_bench.ts | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/std/http/http_bench.ts b/std/http/http_bench.ts index 06043f9e4..462e15e0e 100644 --- a/std/http/http_bench.ts +++ b/std/http/http_bench.ts @@ -5,11 +5,7 @@ const addr = Deno.args[1] || "127.0.0.1:4500"; const server = serve(addr); const body = new TextEncoder().encode("Hello World"); -async function main(): Promise<void> { - console.log(`http://${addr}/`); - for await (const req of server) { - req.respond({ body }); - } +console.log(`http://${addr}/`); +for await (const req of server) { + req.respond({ body }); } - -main(); |