Skip to content

weave-microservices/weave-bee-queue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bee-Queue service mixin for weave.

Installation

$ npm install weave-bee-queue

Usage

const Weave = require('weave-core');
const BeeQueueMixin = require('weave-bee-queue')

const broker = Weave({
    logLevel: 'debug'
});

broker.createService({
    name: 'math',
    mixins: [BeeQueueMixin()]
    actions: {
        add(ctx) {
            return Number(ctx.params.a) + Number(ctx.params.b);
        }
    }
});

broker.start();

// Call service
broker.call('math.add', { a: 5, b: 3 })
    .then(result => console.log('5 + 3 =', result))
    .catch(error => console.error(`Something went wrong! ${error.message}`));

License

The weave framework is available under the MIT license.

Contact

Copyright (c) 2018 by Fachwerk

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors