forked from VeXell/pm2-autoscale
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.ts
37 lines (31 loc) · 862 Bytes
/
index.ts
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
36
37
// @ts-ignore
import pmx from 'pmx';
import { startPm2Connect } from './core/pm2';
import { initLogger } from './utils/logger';
pmx.initModule(
{
widget: {
el: {
probes: true,
actions: true,
},
block: {
actions: false,
issues: true,
meta: true,
},
},
},
function (err: any, conf: IPMXConfig) {
if (err) return console.error(err.stack || err);
const moduleConfig = conf.module_conf;
initLogger({ isDebug: moduleConfig.debug });
startPm2Connect(moduleConfig);
pmx.configureModule({
human_info: [
['Status', 'Module enabled'],
['Debug', moduleConfig.debug ? 'Enabled' : 'Disabled'],
],
});
}
);