This commit is contained in:
sent 2025-05-20 22:13:46 -07:00
parent a9d05bdd84
commit 0c080ba2ac

View File

@ -8,6 +8,7 @@ import express from "express";
import { createServer } from "http";
import compression from "compression";
import WebSocket from "ws";
import { LRUCache } from "lru-cache";
import { baremuxPath } from "@mercuryworkshop/bare-mux/node";
import { epoxyPath } from "@mercuryworkshop/epoxy-transport";
import { libcurlPath } from "@mercuryworkshop/libcurl-transport";
@ -62,6 +63,12 @@ if (global.gc) {
import './others/scaler.mjs';
import './others/warmup.mjs';
const cache = new LRUCache({
maxSize: 1000,
ttl: 4 * 24 * 60 * 60 * 1000,
allowStale: false,
});
const port = parseInt(process.env.PORT || "3000", 10);
function logInfo(msg) { console.info(`[~] ${msg}`); }