1.0.4 • Published 2 years ago

eventboss v1.0.4

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

Eventboss JS

Javascript Eventboss client.

Sample usage:

Create eventboss instance:

const Eventboss = require('eventboss')
const evenboss = Eventboss({ accountId: '1234', appName: 'payouts-webhooks', region: 'us-west-2', environment: 'development' })

Publish event:

evenboss
  .publisher('event_name')
  .publish('payload')
  .then((result) => { /* ok */ })
  .catch((error) => { /* fail */ })

Consume event:

evenboss
  .consumer('src_app_name', 'event_name')
  .listen((event) => {
    // do something with the event
  }, (error) => {
    // handle listening error
  });

Developer mode:

const eventboss = Eventboss({ autoCreate: true, accountId: '1234', appName: 'payouts-webhooks', region: 'us-west-2', environment: 'development' })

Passing autoCreate: true will enable auto create mode. Topics are automatically created when missing. Appropriate policy is needed in that case.

1.0.4

2 years ago

1.0.3

4 years ago

1.0.1

5 years ago

1.0.0

5 years ago