import { spawn } from "node:child_process"; import { getEnginePath } from "@rivetkit/engine-cli"; const enginePath = getEnginePath(); const proc = spawn(enginePath, ["start"], { stdio: "inherit" }); process.on("SIGINT", () => proc.kill("SIGINT")); process.on("SIGTERM", () => proc.kill("SIGTERM")); proc.on("exit", (code) => { process.exit(code ?? 0); });