Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bpedro/gitevents-webhook

GitEvents Webhook module
https://github.com/bpedro/gitevents-webhook

Last synced: 26 days ago
JSON representation

GitEvents Webhook module

Awesome Lists containing this project

README

        

# Introduction

gitevents-webhook is an npm module that can be used to process and validate GitHub originated webhooks.

# Basic usage

```
...

var config = {github: {key: 'MY_WEBHOOK_KEY'}};
var webhook = require('webhook')(config);

app.post('/hook', function(req, res) {
webhook.process(req, function(body, err) {
if (err) {
res.status(err).json({msg: 'Unauthorized'}).end();
} else {
res.send(body);
}
});
});

...
```