Files
freeCodeCamp/probot/presolver/node_modules/@octokit/webhooks/middleware
2018-12-05 11:23:55 +05:30
..
2018-12-05 11:23:55 +05:30
2018-12-05 11:23:55 +05:30
2018-12-05 11:23:55 +05:30
2018-12-05 11:23:55 +05:30
2018-12-05 11:23:55 +05:30
2018-12-05 11:23:55 +05:30

middleware

If you only need the middleware with access to the .sign(), .verify() or the receivers .receive() method, you can use the webhooks middleware directly

const Middleware = require('@octokit/webhooks/middleware')
const middleware = new Middleware({
  secret: 'mysecret',
  path: '/github-webhooks'
})

middleware.on('installation', asyncInstallationHook)

require('http').createServer(middleware).listen(3000)

API

The middleware API implements .on() and .removeListener().

Back to @octokit/webhooks README.