Last active
September 1, 2015 20:31
-
-
Save fabriciotav/b11dad9e8535c44cd706 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node_modules |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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