How to use the seneca.declare function in seneca

To help you get started, we’ve selected a few seneca examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github senecajs / seneca-transport / test / client-queue-foo.js View on Github external
require('seneca')()
  .declare('foo')
  .client({type:'queue',pin:'foo:*'})
  .ready(function(){
    this.act('foo:1,bar:A',function(err,out){console.log(out)})
    this.act('foo:2,bar:B',function(err,out){console.log(out)})
  })
github senecajs / seneca-transport / test / client-pubsub-foo.js View on Github external
require('seneca')()
  .declare('foo')
  .client({type:'pubsub',pin:'foo:*'})
  .ready(function(){
    this.act('foo:1,bar:A',function(err,out){console.log(out)})
    this.act('foo:2,bar:B',function(err,out){console.log(out)})
  })

seneca

A Microservices Framework for Node.js

MIT
Latest version published 5 months ago

Package Health Score

70 / 100
Full package analysis