Skip to content

Instantly share code, notes, and snippets.

@fabriciotav
Last active September 1, 2015 20:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fabriciotav/b11dad9e8535c44cd706 to your computer and use it in GitHub Desktop.
Save fabriciotav/b11dad9e8535c44cd706 to your computer and use it in GitHub Desktop.
node_modules
var express = require('express'),
git = require('gitty');
var app = express();
var web_webhook = git('/var/www/web');
app.get('/web', function(req, res) {
web_webhook.pull('origin', 'master', function(err, succ) {
if (err) return console.log(err);
console.log('/web', succ);
return res.status(200).end();
});
});
app.listen(8181);
{
"name": "web-webhook",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "MIT",
"dependencies": {
"express": "4.13.3",
"gitty": "3.2.3"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment