From 20fca96aa74e983d90217be3207694597516559e Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Fri, 23 Sep 2022 13:33:17 -0500 Subject: [PATCH] Initial commit --- deno.jsonc | 1 + main.ts | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 deno.jsonc create mode 100644 main.ts diff --git a/deno.jsonc b/deno.jsonc new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/deno.jsonc @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/main.ts b/main.ts new file mode 100644 index 0000000..627459f --- /dev/null +++ b/main.ts @@ -0,0 +1,18 @@ +import { copy } from "https://deno.land/std@0.156.0/streams/conversion.ts"; + +const PORT = 5588 +const listener = Deno.listen({ port: 5588 }) + +console.log(`Listening on 0.0.0.0:${PORT}`) + +for await (const conn of listener) { + echo(conn) +} + +async function echo(conn) { + await copy(conn, conn) + conn.close() +} + +async function primeTime(conn) { +} \ No newline at end of file