Created
October 20, 2015 05:28
-
-
Save cgiffard/7e9d7ddbd1935628e915 to your computer and use it in GitHub Desktop.
Tweaking the space bridge API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var config = require('./config'), | |
spacebridge = require('./lib/spacebridge'), | |
redisInput = spacebridge.createInputStream('redis', config.input.redis); | |
outputBridge = spacebridge.createOutputBridge(config.output); | |
redisInput.pipe(outputBridge); | |
redisInput | |
// redisBridge.on('data', function (input) { | |
// var data = input.data.toString().trim().split('\n'); | |
// console.log('data', data); | |
// transmit(data); | |
// }); | |
// | |
redisInput.on('error', function (input) { | |
console.log('error', input.data.toString()); | |
}); | |
redisInput.on('exit', function (input) { | |
console.log('exit', input.data.toString()); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment