1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-28 18:19:08 -05:00

http_bench: print address (denoland/deno_std#374)

Original: f10ea7317e
This commit is contained in:
Ryan Dahl 2019-05-14 17:49:53 -04:00 committed by GitHub
parent 9f877cd34b
commit 592e90c3c2

View file

@ -7,6 +7,7 @@ const server = serve(addr);
const body = new TextEncoder().encode("Hello World");
async function main(): Promise<void> {
console.log(`http://${addr}/`);
for await (const request of server) {
request.respond({ status: 200, body });
}