新增 - 临时测试代码

This commit is contained in:
suwings 2018-05-30 13:19:40 +08:00
parent cb321aaf7f
commit fc18c50f59
2 changed files with 9 additions and 8 deletions

15
app.js
View File

@ -9,6 +9,14 @@ try {
//忽略任何版本检测导致的错误
}
setTimeout(() => {
let arg2 = process.argv[2] || '';
if (arg2 == '--test') {
MCSERVER.infoLog("Test", "测试过程结束 | 退出...");
process.exit(0);
}
}, 10000);
const fs = require('fs');
const fsex = require('fs-extra');
@ -246,13 +254,6 @@ app.use('/fs', require('./onlinefs/controller/function'));
if (MCSERVER.localProperty.ftp_is_allow)
require('./ftpd/index'); //执行ftp逻辑
setTimeout(() => {
let arg2 = process.argv[2];
if (arg2 == '--debug') {
MCSERVER.infoLog("测试完毕 | 退出...");
process.exit(0);
}
}, 10000);
});

View File

@ -42,7 +42,7 @@
},
"scripts": {
"start": "node app.js",
"test": "node app.js"
"test": "node app.js --test"
},
"engines": {
"node": ">=8.0"