diff options
| author | Yusuke Sakurai <kerokerokerop@gmail.com> | 2020-03-21 22:53:47 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-03-21 09:53:47 -0400 |
| commit | 60cee4f045778777a16b6fffd6d5b9a1400d7246 (patch) | |
| tree | a477bd147fbd548d478a289af5bd0681b1a34c4e /std/examples/echo_server.ts | |
| parent | 0adc86f105204b2475126c36dfc10e678f67df56 (diff) | |
avoid using same port number for test (#4147)
Diffstat (limited to 'std/examples/echo_server.ts')
| -rw-r--r-- | std/examples/echo_server.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/std/examples/echo_server.ts b/std/examples/echo_server.ts index dbcc9b5ae..cdd98fea7 100644 --- a/std/examples/echo_server.ts +++ b/std/examples/echo_server.ts @@ -1,6 +1,6 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. const hostname = "0.0.0.0"; -const port = 8080; +const port = +(Deno.args[0] ?? "8080"); const listener = Deno.listen({ hostname, port }); console.log(`Listening on ${hostname}:${port}`); for await (const conn of listener) { |
