aboutsummaryrefslogtreecommitdiff
path: root/docs/api
diff options
context:
space:
mode:
authorGravatar aab <aabccd021@gmail.com> 2023-03-04 21:01:04 +0700
committerGravatar GitHub <noreply@github.com> 2023-03-04 06:01:04 -0800
commit0eeac32ef4ff27fcdf6a1864d94435e162528100 (patch)
treee2880a5e1e56e372bf63e2d0c22f858cceb155e5 /docs/api
parent31447fdc196d767956ac2d2eaf996df3943a2ce6 (diff)
downloadbun-0eeac32ef4ff27fcdf6a1864d94435e162528100.tar.gz
bun-0eeac32ef4ff27fcdf6a1864d94435e162528100.tar.zst
bun-0eeac32ef4ff27fcdf6a1864d94435e162528100.zip
docs(websocket): change server port on example to default port (#2301)
Current example will fail without explicitly configure the server to use port 8080. Hence, replacing it with default port (3000).
Diffstat (limited to 'docs/api')
-rw-r--r--docs/api/websockets.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/api/websockets.md b/docs/api/websockets.md
index 2220b9c8d..f04d10fc6 100644
--- a/docs/api/websockets.md
+++ b/docs/api/websockets.md
@@ -17,13 +17,13 @@ Internally Bun's WebSocket implementation is built on [uWebSockets](https://gith
To connect to an external socket server, create an instance of `WebSocket` with the constructor.
```ts
-const socket = new WebSocket("ws://localhost:8080");
+const socket = new WebSocket("ws://localhost:3000");
```
Bun supports setting custom headers. This is a Bun-specific extension of the `WebSocket` standard.
```ts
-const socket = new WebSocket("ws://localhost:8080", {
+const socket = new WebSocket("ws://localhost:3000", {
headers: {
// custom headers
},