0.2.0 • Published 10 years ago

connect-githubhook v0.2.0

Weekly downloads
15
License
-
Repository
github
Last release
10 years ago

connect-githubhook

This is a simple github post-receive hook implemented as connect middleware for integration with existing apps

var express = require('express'),
    cgh = require('connect-githubhook'),
    sites = { '/supersecretpath': {url: 'https://github.com/yourname/yourrepo',
                                   branch: 'master'},
    app = express.createServer();

var handler = function (repo, payload) {
    console.log('received push from:', repo); // received push from: yourrepo
};

app.use(express.bodyParser()); //required
app.use(cgh(sites, handler));

app.listen(8000);

license

MIT

0.2.0

10 years ago

0.1.2

10 years ago

0.1.1

11 years ago

0.1.0

12 years ago