Initial commit
This commit is contained in:
commit
20fca96aa7
2 changed files with 19 additions and 0 deletions
1
deno.jsonc
Normal file
1
deno.jsonc
Normal file
|
@ -0,0 +1 @@
|
|||
{}
|
18
main.ts
Normal file
18
main.ts
Normal 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) {
|
||||
}
|
Loading…
Reference in a new issue