diff --git a/examples/chat/README.md b/examples/chat/README.md index f42c7395d8..f605c2d66c 100644 --- a/examples/chat/README.md +++ b/examples/chat/README.md @@ -6,7 +6,7 @@ A simple chat demo for Socket.IO ## How to use ``` -$ npm ci +$ npm i $ npm start ``` diff --git a/examples/chat/public/main.js b/examples/chat/public/main.js index 037648cc9c..a32cd3d315 100644 --- a/examples/chat/public/main.js +++ b/examples/chat/public/main.js @@ -264,14 +264,14 @@ $(function() { log('you have been disconnected'); }); - socket.on('reconnect', () => { + socket.io.on('reconnect', () => { log('you have been reconnected'); if (username) { socket.emit('add user', username); } }); - socket.on('reconnect_error', () => { + socket.io.on('reconnect_error', () => { log('attempt to reconnect has failed'); });