mirror of
https://github.com/denoland/deno.git
synced 2024-12-17 21:03:01 -05:00
3542f2de0c
Previously https://github.com/denoland/deno_examples
Original: 14be9a0e82
11 lines
252 B
TypeScript
11 lines
252 B
TypeScript
import { listen, copy } from "deno";
|
|
|
|
(async () => {
|
|
const addr = "0.0.0.0:8080";
|
|
const listener = listen("tcp", addr);
|
|
console.log("listening on", addr);
|
|
while (true) {
|
|
const conn = await listener.accept();
|
|
copy(conn, conn);
|
|
}
|
|
})();
|