Skip to content

Commit

Permalink
Update documentation to correspond with latest release (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
daffl committed Aug 22, 2018
1 parent b46e3d7 commit e67aad9
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions packages/socketio-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,35 @@
npm install @feathersjs/socketio-client --save
```

## Quick example

```js
const feathers = require('@feathersjs/feathers');
const socketio = require('@feathersjs/socketio-client');
const io = require('socket.io-client');

const socket = io('http://api.feathersjs.com');
const app = feathers();

// Set up Socket.io client with the socket
app.configure(socketio(socket));

// Receive real-time events through Socket.io
app.service('messages')
.on('created', message => console.log('New message created', message));

// Call the `messages` service
app.service('messages').create({
text: 'A message from a REST client'
});
```

## Documentation

Please refer to the [@feathersjs/socketio-client documentation](https://docs.feathersjs.com/api/socketio.html#client) for more details.
Please refer to the [@feathersjs/socketio-client documentation](https://docs.feathersjs.com/api/client/socketio.html) for more details.

## License

Copyright (c) 2017
Copyright (c) 2018

Licensed under the [MIT license](LICENSE).

0 comments on commit e67aad9

Please sign in to comment.