Relay points for responsive applications
CoffeeScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
test
.gitignore
LICENSE
README.md
ganglia.js
package.json

README.md

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