Bridging Transports

Piper has support for a number of different transports, for both Node.js and the browser.

Node.js Transports

At this stage, the following transports are available:

Redis

Powered By: redis

var piper = require('piper'),
    testpipe = piper('test');

// publish events via redis
piper.bridge(piper.createTransport('redis')).pub();

// fire an event
testpipe('hit', 'car');

Now, if you were to run this example, while running the MONITOR command within the redis-cli you should see something like:

redis 127.0.0.1:6379> monitor
OK
1327677978.544554 "monitor"
1327678022.363266 "info"
1327678022.364069 "publish" "eve-piper" "[\"test.hit\",\"car\"]"

Transport Source and Test Suite:

https://github.com/sidelab/piper/blob/master/src/transports/node/redis.js https://github.com/sidelab/piper/blob/master/test/bridging/redis.js

Browser Transports

In development...

Table Of Contents

Previous topic

Bridging

Next topic

Function Chaining

This Page