Skip to content

Instantly share code, notes, and snippets.

@crtr0
Created December 3, 2012 20:59
Show Gist options
  • Save crtr0/4197978 to your computer and use it in GitHub Desktop.
Save crtr0/4197978 to your computer and use it in GitHub Desktop.
Connects to the socket.io server and emit a message
var socket = io.connect();
socket.on('connect', function() {
console.log("Connected, lets sign-up for updates about votes for this event");
socket.emit('event', '{{ shortname }}');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment