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

0.0.9-20 • Public • Published

hemera-counter

Your plugin description

Prerequisites

Install and run NATS Server

Example

'use strict'

const Hemera = require('nats-hemera')
const plugin = require('hemera-counter')
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

/@container-stack/hemera-brigade-gw-plugin/

    Package Sidebar

    Install

    npm i @container-stack/hemera-brigade-gw-plugin

    Weekly Downloads

    4

    Version

    0.0.9-20

    License

    MIT

    Unpacked Size

    21.4 kB

    Total Files

    6

    Last publish

    Collaborators

    • container-stack