This commit is contained in:
2026-09-22 16:07:09 +01:00
parent 1c52617728
commit 15eb1f7982
6 changed files with 49 additions and 54 deletions
-19
View File
@@ -1,25 +1,6 @@
import { readFileSync } from "fs";
import bunextInit from "../../functions/bunext-init";
import startServer from "../../functions/server/start-server";
import grabDirNames from "../../utils/grab-dir-names";
import { log } from "../../utils/log";
const { BUNDLER_CTX_MAP_JSON, SSR_BUNDLER_CTX_MAP_JSON } = grabDirNames();
log.info("Starting production server ...");
try {
const bundler_ctx_json = JSON.parse(readFileSync(BUNDLER_CTX_MAP_JSON, "utf-8"));
if (bundler_ctx_json) {
global.BUNEXT_BUNDLER_CTX_MAP = bundler_ctx_json;
}
}
catch (error) {
// log.error(`Couldn't set global bundler CTX map: ${error.message}`);
}
try {
const ssr_bundler_ctx_json = JSON.parse(readFileSync(SSR_BUNDLER_CTX_MAP_JSON, "utf-8"));
if (ssr_bundler_ctx_json) {
global.BUNEXT_SSR_BUNDLER_CTX_MAP = ssr_bundler_ctx_json;
}
}
catch (error) { }
await bunextInit();
await startServer();