Skip to content

Commit 9a8acd0

Browse files
Updated Deno example to use port 8080 (#363)
1 parent e949f79 commit 9a8acd0

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

websockets/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ The client starts the connection on the [`pageshow`](https://developer.mozilla.o
1111
The server-side is written in [Deno](https://deno.com/) so Deno needs to be installed first. Then, with Deno in your path, you can start the server with a command like:
1212

1313
```bash
14-
deno run --allow-net=0.0.0.0:80 --allow-read=./index.html,./client.js,client.css main.js
14+
deno run --allow-net=0.0.0.0:8080 --allow-read=./index.html,./client.js,client.css main.js
1515
```
1616

17-
You can then navigate to http://localhost:80/ and you should see the application running.
17+
You can then navigate to http://localhost:8080/ and you should see the application running.

websockets/client.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const wsUri = "ws://127.0.0.1/";
1+
const wsUri = "ws://127.0.0.1:8080/";
22
let websocket = null;
33
let pingInterval;
44
let counter = 0;

websockets/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ async function createResponse(path, mimeType) {
66
}
77

88
Deno.serve({
9-
port: 80,
9+
port: 8080,
1010
async handler(request) {
1111
if (request.headers.get("upgrade") !== "websocket") {
1212
const url = new URL(request.url);

0 commit comments

Comments
 (0)