-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathindex.js
More file actions
31 lines (26 loc) · 788 Bytes
/
index.js
File metadata and controls
31 lines (26 loc) · 788 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
/* --------------------------------------------------------------- */
/* index.js */
/* --------------------------------------------------------------- */
process.removeAllListeners("warning");
process.on("warning", (warning) => {
if (warning.name === "DeprecationWarning") return;
console.warn(warning.name, warning.message);
});
const LCEProxy = require("./src/lceproxy");
const proxy = new LCEProxy();
(async () => {
await proxy.start();
})();
process.on("SIGINT", () => {
proxy.stop();
setTimeout(() => {
process.exit(0);
}, 200);
});
process.on("SIGTERM", () => {
proxy.stop();
setTimeout(() => {
process.exit(0);
}, 200);
});
/* --------------------------------------------------------------- */