Skip to main content
Module

std/examples/echo_server.ts

Deno standard library
Go to Latest
File
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.const hostname = "0.0.0.0";const port = 8080;const listener = Deno.listen({ hostname, port });console.log(`Listening on ${hostname}:${port}`);for await (const conn of listener) { Deno.copy(conn, conn);}