mirror of
https://github.com/denoland/deno.git
synced 2024-11-22 15:06:54 -05:00
99de9eb4c2
Fixes #12115
14 lines
307 B
TypeScript
14 lines
307 B
TypeScript
const listener = Deno.listen({ port: 8080 });
|
|
|
|
for await (const conn of listener) {
|
|
handleConn(conn);
|
|
}
|
|
|
|
function handleConn(conn: Deno.Conn) {
|
|
const httpConn = Deno.serveHttp(conn);
|
|
for await (const event of httpConn) {
|
|
event.respondWith(new Response("html", { status: 200 }));
|
|
}
|
|
}
|
|
|
|
export {};
|