BitBucket WebHook Middleware
This middleware allows you to hook push event from BitBucket and execute some
actions such as git-pull
.
Getting Started
This middleware requires express and body-parser package to function properly.
npm install --save express body-parser bitbucket-hook
Usage
Create simple web server using express with POST route containing the BitBucket webhook middleware.
Middleware call guide:
Example usage with express:
// Include librariesconst express = const bodyParser = const bitbucket = const exec = execFile var app = // Set this to enable X-Forwarded-For behind reverse proxyapp// Assign JSON body parserapp // Create web hookapp // Start web serverapp
Please do not run synchronous process inside handler function as the web server will completely stop working and will not handle any requests.