Skip to content

Instantly share code, notes, and snippets.

@mattisfrommars
Created October 25, 2013 13:00
Show Gist options
  • Save mattisfrommars/7154333 to your computer and use it in GitHub Desktop.
Save mattisfrommars/7154333 to your computer and use it in GitHub Desktop.
module.exports.bootstrap = function (cb) {
redisClient.subscribe('scoredTweets');
redisClient.on( 'message', function ( channel , message ) {
console.log( REDIS , MESSAGE_RECEIVED, SCORED_TWEETS )
sails.io.emit( 'scoredTweets' , message );
});
cb();
};
var socket = io.connect();
socket.on('connect', function socketConnected() {
console.log('listening');
socket.on('scoredTweets', function tweetsReceived ( message ) {
console.log(message);
});
});
@mattisfrommars
Copy link
Author

Both the REDIS and the 'listening' logs fire, but no the 'scoredTweets'. I think i might be doing something stupid...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment