This commit is contained in:
a2a-platform
2026-06-11 23:13:20 +00:00
parent 195a793bfa
commit 7aab2dccb9
6 changed files with 88 additions and 9 deletions

View File

@@ -0,0 +1,23 @@
import { spawnSync } from "node:child_process";
import { existsSync } from "node:fs";
const candidates = [
".next/standalone/server.js",
".next/standalone/frontend/server.js",
];
const server = candidates.find((path) => existsSync(path));
if (!server) {
throw new Error("Next standalone server.js not found; run npm run build first");
}
const result = spawnSync(process.execPath, [server], {
stdio: "inherit",
env: {
...process.env,
HOSTNAME: process.env.HOSTNAME || "127.0.0.1",
PORT: process.env.PORT || "3000",
},
});
process.exit(result.status ?? 1);