Last active
December 15, 2015 14:59
-
-
Save kyleconroy/5278517 to your computer and use it in GitHub Desktop.
Use websockets to receive Github repo events
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 connection = new WebSocket('ws://socktocat.org/hooks?repo=:owner/:repo'); | |
// Log events from Github | |
connection.onmessage = function (e) { | |
var events = JSON.parse(e.data); // An array of Github events | |
console.log(events); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment