mirror of
https://github.com/denoland/deno.git
synced 2024-12-26 00:59:24 -05:00
2ba7de2d04
Original: 6063378a92
12 lines
321 B
TypeScript
12 lines
321 B
TypeScript
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
|
|
const { listen, copy } = 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);
|
|
}
|
|
})();
|