mirror of
https://github.com/imjasonh/deno-image
synced 2026-07-08 09:05:41 +00:00
14 lines
413 B
JavaScript
14 lines
413 B
JavaScript
const listener = Deno.listen({ port: 8000 });
|
|
console.log("http://localhost:8000/");
|
|
for await (const conn of listener) {
|
|
(async () => {
|
|
const requests = Deno.serveHttp(conn);
|
|
for await (const { respondWith } of requests) {
|
|
respondWith(new Response("Hello world"));
|
|
}
|
|
})();
|
|
}
|
|
|
|
import { assertEquals } from "https://deno.land/std@0.106.0/testing/asserts.ts";
|
|
assertEquals("hello", "hello");
|
|
|