Skip to content

Commit b79d80a

Browse files
KartikeSinghdarrachequesne
authored andcommitted
docs: fix conjunction with fastify example (#5057)
[skip ci]
1 parent 7fd75e6 commit b79d80a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/socket.io/Readme.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,9 @@ called `io`.
160160
```js
161161
const app = require('fastify')();
162162
app.register(require('fastify-socket.io'));
163-
app.io.on('connection', () => { /**/ });
163+
app.ready().then(() => {
164+
app.io.on('connection', () => { /**/ });
165+
})
164166
app.listen(3000);
165167
```
166168

0 commit comments

Comments
 (0)