forked from VeXell/pm2-autoscale
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
35 lines (35 loc) · 1.04 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
"use strict";
/// <reference path="@types/global.d.ts" />
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
// @ts-ignore
const pmx_1 = __importDefault(require("pmx"));
const pm2_1 = require("./core/pm2");
const logger_1 = require("./utils/logger");
pmx_1.default.initModule({
widget: {
el: {
probes: true,
actions: true,
},
block: {
actions: false,
issues: true,
meta: true,
},
},
}, function (err, conf) {
if (err)
return console.error(err.stack || err);
const moduleConfig = conf.module_conf;
(0, logger_1.initLogger)({ isDebug: moduleConfig.debug });
(0, pm2_1.startPm2Connect)(moduleConfig);
pmx_1.default.configureModule({
human_info: [
["Status", "Module enabled"],
["Debug", moduleConfig.debug ? "Enabled" : "Disabled"],
],
});
});