From c89ce6b4a6d0ecde3b377651e26b580f0b595329 Mon Sep 17 00:00:00 2001 From: Jason Date: Sun, 10 Jul 2022 19:38:05 -0400 Subject: [PATCH] =?UTF-8?q?=E2=9E=95=20Added:=20data/=20=E2=9E=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/sample.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 data/sample.ts diff --git a/data/sample.ts b/data/sample.ts new file mode 100644 index 0000000..e860653 --- /dev/null +++ b/data/sample.ts @@ -0,0 +1,10 @@ +import { serve } from 'https://deno.land/std@0.77.0/http/server.ts'; + +const PORT = 1993; +const s = serve(`0.0.0.0:${PORT}`); +const body = new TextEncoder().encode('Hello World\n'); + +console.log(`Server started on port ${PORT}`); +for await (const req of s) { + req.respond({ body }); +}