Created
March 26, 2015 20:18
-
-
Save acodesmith/c0ae09d4ecae0722d11b to your computer and use it in GitHub Desktop.
SailsJS simple sockets.io sub/pub functions for front-end javascript.
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
io.socket.get('/user', {}, function(users){ | |
console.log(users); | |
}); | |
io.socket.on('user', function(message){ | |
console.log('Got Message', message); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment