diff options
Diffstat (limited to 'std/examples/chat/server.ts')
-rw-r--r-- | std/examples/chat/server.ts | 6 |
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...."); |