Skip to content

Commit 6384aae

Browse files
authored
Update README.md (#227)
1 parent 83ec6ac commit 6384aae

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,10 @@ This plugin uses the same router as the `fastify` instance, this has a few impli
129129

130130
```js
131131
import Fastify from 'fastify'
132+
import websocket from '@fastify/websocket'
132133

133134
const fastify = Fastify()
134-
await fastify.register(require('@fastify/websocket'))
135+
await fastify.register(websocket)
135136

136137
fastify.get('/', { websocket: true }, function wsHandler (connection, req) {
137138
// bound to fastify server

0 commit comments

Comments
 (0)