Created
October 25, 2013 13:00
-
-
Save mattisfrommars/7154333 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| 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(); | |
| }; |
This file contains hidden or 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
| var socket = io.connect(); | |
| socket.on('connect', function socketConnected() { | |
| console.log('listening'); | |
| socket.on('scoredTweets', function tweetsReceived ( message ) { | |
| console.log(message); | |
| }); | |
| }); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Both the
REDISand the'listening'logs fire, but no the 'scoredTweets'. I think i might be doing something stupid...