mirror of
https://github.com/denoland/deno.git
synced 2024-12-30 11:16:38 -05:00
parent
9f877cd34b
commit
592e90c3c2
1 changed files with 1 additions and 0 deletions
|
@ -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 });
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue