This repository has been archived by the owner. It is now read-only.
Create realtime apps on top of GitHub
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

GitHub Realtime Relay Build Status Code Climate

⚠️ This repository is no longer maintained by Lukas Martinelli.

Receive all GitHub events in realtime with from the GitHub Realtime Relay which polls all public events and then relays them directly via websockets. This is probably the simplest way to create a realtime application on top of GitHub.

Below you see a statistics page of GitHub events built on top of GHRR.

Screenshot of GitHub Realtime Relay

For a short tutorial head over to my blog post about GHRR or continue reading. For a more sophisticated usage example checkout my other project delptr, which lints all C++ commits in realtime.

Connect from Server (Node)

Install the from npm.

npm install

To receive all events you can hook onto the /events namespace and subscribe to a specific GitHub Event. Please use lower case for subscribing to the event types.

var url = '';
var socket = require('')(url);

socket.on('pushevent', function(event){
   console.log('Push: ' + event.repository.full_name);

There is also a /statistics namespace used by the GHRR web interface that sends usage statistics for the Event Types.

var url = '';
var io = require('')(url);
io('/statistics').on('types', function(typeCounts) {
    console.log('PushEvents: ' + typeCounts.pushevent);

Connect from Web Application

You need to add the to your web application.

<script src="//"></script>

You can now connect directly to the public websocket. We support CORS for all domains so you should not encounter any problems.

var url = '';
var socket = io(url);

socket.on('pushevent', function (event) {
   console.log('Push: ' + event.repository.full_name);

Host it yourself

In order to poll all events you need an OAUTH access token. Run the github realtime relay with a poll rate of 1000 and on port 3000.

docker pull lukasmartinelli/ghrr
docker run -e GITHUB_TOKEN="acbas3dfas.." -p 3000:3000 lukasmartinelli/ghrr