Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    gangliapublic

    ganglia

    Relay points for reactive applications

    Kinesis

    Installation

    $ npm install --save ganglia
    

    Routing

    var assert = require('assert');
    var app    = require('ganglia');
    
    app
      .define(route, label)
      .define('/action/:id', 'customActions')
    
    var stream = app.customActions;
    
    // Let's say we've just published {"foo": "bar"} to a stream named /action/123
    
    stream.onValue(function (data) {
      assert(data.label === 'customActions');
      assert(data.param.id === '123');
      assert(data.value.foo === 'bar')
    });
    
    • route, is a definition of a route and is an extension of Express' routing syntax.

    • stream, is a event-stream of Bacon.js

    Keywords

    none

    install

    npm i ganglia

    Downloadsweekly downloads

    8

    version

    0.0.2

    license

    none

    last publish

    collaborators

    • avatar