From b0b91c4f5de03c25123234ae491ed4cb8b3a7422 Mon Sep 17 00:00:00 2001 From: pan <1029559041@qq.com> Date: Sat, 10 Oct 2020 02:07:37 +0800 Subject: [PATCH] init --- routes/index.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/routes/index.js b/routes/index.js index 0774ed0..fa8a866 100644 --- a/routes/index.js +++ b/routes/index.js @@ -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}`}) + })