1 Star 0 Fork 0

火眼 / client.webhook

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
index.js 1.34 KB
一键复制 编辑 原始数据 按行查看 历史
Xueping Li 提交于 2017-12-02 18:41 . init
var http = require('http');
var exec = require('shelljs').exec;
const PORT = 6603;
console.log('listening port at: ' + PORT);
const cmds = {
'service/users': 'cd /mnt/authing/users && git pull',
'service/emails': 'cd /mnt/authing/emails && git pull',
'service/pay': 'cd /mnt/authing/pay && git pull',
'service/oauth': 'cd /mnt/authing/oauth && git pull',
client: 'cd /mnt/authing/client && git pull'
};
console.log(cmds);
var deployServer = http.createServer(function(request, response) {
// var inCMDs = false,
// cmd = '';
// for (var key in cmds) {
// if (key == request.url) {
// inCMDs = true;
// cmd = cmds[key];
// break;
// }
// }
// if (inCMDs) {
// exec(cmd, function(err, out, code) {
// if (err instanceof Error) {
// response.writeHead(500);
// response.end('Server Internal Error.');
// throw err;
// }
// process.stderr.write(err.toString());
// process.stdout.write(out.toString());
// response.writeHead(200);
// response.end('Deploy Done.');
// });
// } else {
// response.writeHead(404);
// response.end('Invalid Deploy Request');
// }
console.log(request)
});
deployServer.listen(PORT);
JavaScript
1
https://gitee.com/gfzl/client.webhook.git
git@gitee.com:gfzl/client.webhook.git
gfzl
client.webhook
client.webhook
master

搜索帮助