2.0.0 • Published 7 years ago

nats-event v2.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

NATS Event

Help emit and handle events by nats

Installation

npm install --save nats-event

Usage

const connectNats = require('nats-event')

const natsEvent = connectNats('nats://localhost:4222')
  .setQueueGroup('test') // optional, but you should provide it if you want to launch multiple instances.
    
natsEvent.listen('hello', msg => console.log(msg))

natsEvent.send('test.hello', 'Bob')

// if you don't use this connection anymore, you can close it.
natsEvent.close()

License

MIT

2.0.0

7 years ago

1.3.2

7 years ago

1.3.1

7 years ago

1.3.0

7 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago