https://github.com/bugthesystem/socket.io-rabbitmq-emitter
socket.io emitter implementation
https://github.com/bugthesystem/socket.io-rabbitmq-emitter
Last synced: 12 months ago
JSON representation
socket.io emitter implementation
- Host: GitHub
- URL: https://github.com/bugthesystem/socket.io-rabbitmq-emitter
- Owner: bugthesystem
- License: mit
- Created: 2015-06-01T20:50:58.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2015-06-19T21:41:10.000Z (almost 11 years ago)
- Last Synced: 2025-06-19T16:15:53.492Z (12 months ago)
- Language: JavaScript
- Size: 152 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# socket.io-rabbitmq-emitter
[](https://travis-ci.org/ziyasal/socket.io-rabbitmq-emitter)
[](https://coveralls.io/r/ziyasal/socket.io-rabbitmq-emitter)
[](https://david-dm.org/ziyasal/socket.io-rabbitmq-emitter)
socket.io emitter [rabbitmq](https://www.rabbitmq.com/) implementation.
# Installing
```shell
$ npm install socket.io-rabbitmq-emitter
```
# Usage
```js
var emitter = require('socket.io-rabbitmq-emitter')();
setInterval(function () {
emitter.emit('time', new Date);
}, 1000);
```
# API
`socket.io-rabbitmq-emitter` API is virtually the same as [socket.io-emitter](https://github.com/automattic/socket.io-emitter#api).
## Emitter(opts)
The following options are allowed:
- key: the name of the key to pub/sub events on as prefix (socket.io-rabbitmq)
- host: host to connect to socket.io-rabbitmq-server on (127.0.0.1)
- port: port to connect to socket.io-rabbitmq-server on (5672)
# Testing
```shell
$ make test
```
# TODO
more test !!
# License
[MIT license](http://www.opensource.org/licenses/mit-license.php).
See the `LICENSE`.