summaryrefslogtreecommitdiff
path: root/std/examples/chat/server.ts
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2020-03-24 17:24:58 +0100
committerGitHub <noreply@github.com>2020-03-24 12:24:58 -0400
commit30bcf6a2ea620aa989a7362e7f4a62fc11743bb4 (patch)
treea1e0721425a34c40142230fe392cac15170a6791 /std/examples/chat/server.ts
parentb2478f3a217d5decbb638bf46e169ee58f17adad (diff)
Revert "avoid using same port number for test (#4147)"
Ref #4467 This reverts commit 60cee4f045778777a16b6fffd6d5b9a1400d7246.
Diffstat (limited to 'std/examples/chat/server.ts')
-rw-r--r--std/examples/chat/server.ts6
1 files changed, 2 insertions, 4 deletions
diff --git a/std/examples/chat/server.ts b/std/examples/chat/server.ts
index d28f9f43f..08aede05b 100644
--- a/std/examples/chat/server.ts
+++ b/std/examples/chat/server.ts
@@ -29,9 +29,7 @@ async function wsHandler(ws: WebSocket): Promise<void> {
}
}
-const addr = Deno.args[0] ?? "127.0.0.1:8080";
-
-listenAndServe(addr, async req => {
+listenAndServe({ port: 8080 }, async req => {
if (req.method === "GET" && req.url === "/") {
//Serve with hack
const u = new URL("./index.html", import.meta.url);
@@ -77,4 +75,4 @@ listenAndServe(addr, async req => {
}
}
});
-console.log(`chat server starting on ${addr}....`);
+console.log("chat server starting on :8080....");