1
0
Fork 0
mirror of https://github.com/imjasonh/deno-image synced 2026-07-11 10:29:46 +00:00
deno-image/example.js

11 lines
298 B
JavaScript
Raw Normal View History

2021-08-24 09:37:21 -04:00
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"));
}
})();
}