-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
34 lines (28 loc) · 713 Bytes
/
Copy pathindex.js
File metadata and controls
34 lines (28 loc) · 713 Bytes
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
const Logger = require("./src/DataCollector/Loggers/MasterProcessLogger")
const ProcessManager = require("./src/Processes/ProcessManager");
class Application {
constructor() {
this.processManager = new ProcessManager();
}
async start() {
try {
await this.processManager.initialize();
} catch (error) {
Logger.error(error);
await this.shutdown();
}
}
async shutdown() {
await this.processManager.shutdown();
process.exit(1);
}
}
(async () => {
try {
const app = new Application();
await app.start();
} catch (e) {
Logger.error(e);
process.exit(1);
}
})();