Have ideas to improve npm?Join in the discussion! »

    weave-bee-queue

    0.0.2 • Public • Published

    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

    Keywords

    none

    Install

    npm i weave-bee-queue

    DownloadsWeekly Downloads

    3

    Version

    0.0.2

    License

    MIT

    Unpacked Size

    2.29 kB

    Total Files

    4

    Last publish

    Collaborators

    • avatar