Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Built upon [ws@8](https://www.npmjs.com/package/ws).

```shell
npm i @fastify/websocket
# or
# or
yarn add @fastify/websocket
```

Expand Down Expand Up @@ -277,7 +277,7 @@ fastify.get('/', { websocket: true }, (socket, req) => {
const stream = ws.createWebSocketStream(socket, { /* options */ })
stream.setEncoding('utf8')
stream.write('hello client')

stream.on('data', function (data) {
// Make sure to set up a data handler or read all the incoming
// data in another way, otherwise stream backpressure will cause
Expand Down Expand Up @@ -314,7 +314,7 @@ App.register(async function(fastify) {
})
})

module.exports = App
module.exports = App
```

#### App.test.js
Expand Down
2 changes: 1 addition & 1 deletion types/index.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,4 +164,4 @@ server.get('/websockets-no-type-inference',

expectType<typeof fastifyWebsocket>(namedFastifyWebsocket);
expectType<typeof fastifyWebsocket>(defaultFastifyWebsocket);