mm_os 4.1.0 → 4.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/server.js +10 -14
package/package.json
CHANGED
package/server.js
CHANGED
|
@@ -278,18 +278,14 @@ Server.prototype.init = async function () {
|
|
|
278
278
|
* 初始化
|
|
279
279
|
*/
|
|
280
280
|
Server.prototype._init = async function () {
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
this._initErrorRun();
|
|
290
|
-
} catch (error) {
|
|
291
|
-
this.log('error', '实例化失败:', error);
|
|
292
|
-
}
|
|
281
|
+
// 初始化工具
|
|
282
|
+
this._initTool();
|
|
283
|
+
// 初始化基础设施
|
|
284
|
+
this._initBase();
|
|
285
|
+
// 初始化模块
|
|
286
|
+
this._initMod();
|
|
287
|
+
// 统一处理错误
|
|
288
|
+
this._initErrorRun();
|
|
293
289
|
};
|
|
294
290
|
|
|
295
291
|
/**
|
|
@@ -345,7 +341,7 @@ Server.prototype._initTool = function () {
|
|
|
345
341
|
/**
|
|
346
342
|
* 初始化模块
|
|
347
343
|
*/
|
|
348
|
-
Server.prototype._initMod =
|
|
344
|
+
Server.prototype._initMod = function () {
|
|
349
345
|
// 模板引擎
|
|
350
346
|
require('mm_tpl');
|
|
351
347
|
const Http = require('mm_https').Http;
|
|
@@ -389,7 +385,7 @@ Server.prototype._start = async function () {
|
|
|
389
385
|
* 运行模块
|
|
390
386
|
*/
|
|
391
387
|
Server.prototype._runMod = async function () {
|
|
392
|
-
await Promise.all([
|
|
388
|
+
await Promise.all([
|
|
393
389
|
// 启动TCP
|
|
394
390
|
this.tpc.run(),
|
|
395
391
|
// 启动软件
|