mirror of
https://github.com/denoland/deno.git
synced 2024-11-27 16:10:57 -05:00
dcd01dd025
Make warnings fail
Original: 4543b563a9
12 lines
336 B
TypeScript
12 lines
336 B
TypeScript
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
|
|
const { listen, copy } = Deno;
|
|
|
|
(async (): Promise<void> => {
|
|
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);
|
|
}
|
|
})();
|