summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/echo_server.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/cli/tests/echo_server.ts b/cli/tests/echo_server.ts
index 73995eab5..82ee1fdab 100644
--- a/cli/tests/echo_server.ts
+++ b/cli/tests/echo_server.ts
@@ -1,6 +1,7 @@
const { args, listen, copy } = Deno;
const addr = args[1] || "127.0.0.1:4544";
-const listener = listen("tcp", addr);
+const [hostname, port] = addr.split(":");
+const listener = listen({ hostname, port: Number(port) });
console.log("listening on", addr);
listener.accept().then(
async (conn): Promise<void> => {