mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-25 10:01:30 -04:00
middleware
If you only need the middleware with access to the .sign(), .verify() or the receiver’s .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.