Skip to content

Commit

Permalink
docs(readme): listen 'data' on getData example
Browse files Browse the repository at this point in the history
Fixes #4
  • Loading branch information
João Neto authored and netoax committed Jul 31, 2019
1 parent b00fd81 commit 39142a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -513,8 +513,8 @@ const client = new KNoTCloudWebSocket({
client.on('ready', () => {
client.getData('6e5a681b2ae7be40', [253]);
});
client.on('sent', () => {
client.close();
client.on('data', (data) => {
console.log(JSON.stringify(data, null, 2));
});
client.on('error', (err) => {
console.error(err);
Expand Down

0 comments on commit 39142a2

Please sign in to comment.