Initial commit

This commit is contained in:
Daniel Flanagan 2022-09-23 13:33:17 -05:00
commit 20fca96aa7
Signed by: lytedev
GPG key ID: 5B2020A0F9921EF4
2 changed files with 19 additions and 0 deletions

1
deno.jsonc Normal file
View file

@ -0,0 +1 @@
{}

18
main.ts Normal file
View file

@ -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) {
}