Skip to content

Commit 29c42b6

Browse files
authored
Merge pull request #38 from yaikohi/patch-3
2 parents 8bddb4e + 655941e commit 29c42b6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/patterns/websocket.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ To start working with a WebSocket, register the Elysia WebSocket plugin, and dec
2323
```typescript
2424
import { Elysia, ws } from 'elysia'
2525

26-
new Elysia()
26+
const app = new Elysia()
2727
.use(ws())
2828
.ws('/ws', {
2929
message(ws, message) {
@@ -84,7 +84,7 @@ Example:
8484
```typescript
8585
import { Elysia, ws } from 'elysia'
8686

87-
new Elysia()
87+
const app = new Elysia()
8888
.use(ws())
8989
.ws('/ws', {
9090
message(ws, message) {
@@ -223,7 +223,7 @@ By default Elysia will parse incoming stringified JSON message as Object for val
223223
```typescript
224224
import { Elysia, ws } from 'elysia'
225225

226-
new Elysia()
226+
const app = new Elysia()
227227
.use(ws())
228228
.ws('/ws', {
229229
// validate incoming message

0 commit comments

Comments
 (0)