|
|
|
@ -10,11 +10,13 @@ router.post('/server', function(req, res, next) { |
|
|
|
|
// 输出当前目录(不一定是代码所在的目录)下的文件和文件夹
|
|
|
|
|
exec('nohup updateRisk RiskCloudMock &', (err, stdout, stderr) => { |
|
|
|
|
if(err) { |
|
|
|
|
console.log(err) |
|
|
|
|
console.info(err) |
|
|
|
|
res.json({message:'自动部署服务端失败'}) |
|
|
|
|
return; |
|
|
|
|
}else { |
|
|
|
|
console.info(stdout) |
|
|
|
|
res.json({message: `开始自动部署服务端,版本号:${updated_at}`}) |
|
|
|
|
} |
|
|
|
|
res.json({message:`开始自动部署服务端,版本号:${updated_at}`}) |
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|