deno.land / std@0.166.0 / examples / echo_server.ts

echo_server.ts
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
/** A simple echo server which listens on port `:8080`. * * @module */
import { copy } from "../streams/conversion.ts";
const hostname = "0.0.0.0";const port = 8080;const listener = Deno.listen({ hostname, port });
console.log(`Listening on http://localhost:${port}`);
for await (const conn of listener) { copy(conn, conn);}
std
Deno standard library
GitHub Repositorydenoland/deno_std
GitHub Stars
2458

Version Info

Tagged at
2 months ago