@finder-stack/hemera-plugin
TypeScript icon, indicating that this package has built-in type declarations

0.0.17-39 • Public • Published

hemera-plugin

Your plugin description

Prerequisites

Install and run NATS Server

Example

'use strict'

const Hemera = require('nats-hemera')
const plugin = require('hemera-plugin')
const nats = require('nats').connect()

const hemera = new Hemera(nats, {
  logLevel: 'info'
})

hemera.use(plugin)

hemera.ready(() => {
  hemera.act({
    topic: 'counter',
    cmd: 'add',
    a: 1,
    b: 2
  }, function (err, resp) {
    this.log.info(resp, 'Result')
  })
})

Test

npm run test

Code coverage

npm run coverage

Linting

npm run lint

Readme

Keywords

none

Package Sidebar

Install

npm i @finder-stack/hemera-plugin

Weekly Downloads

1

Version

0.0.17-39

License

MIT

Unpacked Size

21.9 kB

Total Files

8

Last publish

Collaborators

  • finder-stack