updates
This commit is contained in:
parent
c3293e1ec4
commit
3072ebe966
3
app.js
3
app.js
@ -21,7 +21,8 @@ app.use(function(err, req, res, next) {
|
||||
|
||||
// render the error page
|
||||
res.status(err.status || 500);
|
||||
res.json({message: 'error!'});
|
||||
console.dir(err)
|
||||
res.json({message: err.message});
|
||||
});
|
||||
|
||||
module.exports = app;
|
||||
|
@ -6,6 +6,7 @@
|
||||
"start": "node ./bin/www"
|
||||
},
|
||||
"dependencies": {
|
||||
"express": "^4.16.4"
|
||||
"express": "^4.16.4",
|
||||
"forever": "^0.15.3"
|
||||
}
|
||||
}
|
||||
|
@ -63,12 +63,14 @@ router.all('/', function(req, res, next) {
|
||||
var call = (req.body.created && 'create') ||
|
||||
(req.body.deleted && 'delete') ||
|
||||
'update';
|
||||
console.log('body');
|
||||
|
||||
var branch = req.body.ref.replace('refs/heads/', '');
|
||||
var sshURL = req.body.repository.ssh_url;
|
||||
if(call === 'update' && !fs.existsSync('/var/www/gitwrapper/'+name)) call = 'create';
|
||||
|
||||
console.log('body');
|
||||
console.log('branch', branch, 'sshURL', sshURL)
|
||||
// if(call === 'update' && !fs.existsSync('/var/wres.locals.messageww/gitwrapper/'+name)) call = 'create';
|
||||
|
||||
|
||||
// return calls[call](req, res, branch, sshURL);
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user