mirror of
https://github.com/DeveloperExotic/LegacyCrossPlay.git
synced 2026-07-15 23:31:00 +00:00
32 lines
788 B
JavaScript
32 lines
788 B
JavaScript
/* --------------------------------------------------------------- */
|
|
/* 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);
|
|
});
|
|
/* --------------------------------------------------------------- */
|