提交 592e90c3 编写于 作者: R Ryan Dahl 提交者: GitHub

http_bench: print address (denoland/deno_std#374)


Original: https://github.com/denoland/deno_std/commit/f10ea7317e68dd9c1d272e7fff7e9531c301e07c
上级 9f877cd3
......@@ -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 });
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册