authorgravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-02-13 00:19:32-08:00
committergravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-02-13 00:19:32-08:00
log4fff00c8c3bed8864530d31617fb45e4788b9d83
tree6e091f3564c4fe8c2394da46ecc8b9f17bf87f1a
parent6b916d3a6fbe2145ac53776c73ba7b3d0aa969de

run backend as node


1 files changed, 6 insertions(+), 1 deletions(-)

apps/desktop/src/main.ts+6-1
...@@ -83,7 +83,12 @@ function startBackend(): void {...@@ -83,7 +83,12 @@ function startBackend(): void {
8383
84 const child = spawn(process.execPath, [BACKEND_ENTRY], {84 const child = spawn(process.execPath, [BACKEND_ENTRY], {
85 cwd: ROOT_DIR,85 cwd: ROOT_DIR,
86 env: backendEnv(),86 // In Electron main, process.execPath points to the Electron binary.
87 // Run the child in Node mode so this backend process does not become a GUI app instance.
88 env: {
89 ...backendEnv(),
90 ELECTRON_RUN_AS_NODE: "1",
91 },
87 stdio: "inherit",92 stdio: "inherit",
88 });93 });
89 backendProcess = child;94 backendProcess = child;