mirror of
https://github.com/denoland/deno.git
synced 2025-01-14 10:01:51 -05:00
http_bench: print address (#374)
This commit is contained in:
parent
9e8e6f9356
commit
f10ea7317e
1 changed files with 1 additions and 0 deletions
|
@ -7,6 +7,7 @@ const server = serve(addr);
|
||||||
const body = new TextEncoder().encode("Hello World");
|
const body = new TextEncoder().encode("Hello World");
|
||||||
|
|
||||||
async function main(): Promise<void> {
|
async function main(): Promise<void> {
|
||||||
|
console.log(`http://${addr}/`);
|
||||||
for await (const request of server) {
|
for await (const request of server) {
|
||||||
request.respond({ status: 200, body });
|
request.respond({ status: 200, body });
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue