18 lines
344 B
TypeScript
18 lines
344 B
TypeScript
|
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) {
|
||
|
}
|