Commit 386b072e authored by shangbj's avatar shangbj

增加bjgee

parent 63f64ef6
...@@ -47,6 +47,23 @@ app.all('/wiki/update', function(req, res){ ...@@ -47,6 +47,23 @@ app.all('/wiki/update', function(req, res){
}) })
}) })
app.all('/bjgee/update', function(req, res){
const WIKI_PATH = '/home/bjgee'
const commands = [
'cd ' + WIKI_PATH,
'git pull'
].join('&&')
exec(commands, function(err,out){
if(err instanceof Error){
res.writeHead(500)
res.end('Hook error')
throw err
}
res.status(200).end()
})
})
app.post('/register', function(req, res){ app.post('/register', function(req, res){
const site = req.body.site const site = req.body.site
const machine = req.body.machine const machine = req.body.machine
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment