Skip to content

Instantly share code, notes, and snippets.

@rcy
Created September 4, 2013 08:08
Show Gist options
  • Save rcy/6434088 to your computer and use it in GitHub Desktop.
Save rcy/6434088 to your computer and use it in GitHub Desktop.
meteor streams demo code
chatStream = new Meteor.Stream('chat');
if(Meteor.isClient) {
sendChat = function(message) {
chatStream.emit('message', message);
console.log('me: ' + message);
};
chatStream.on('message', function(message) {
console.log('user: ' + message);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment