run backend as node

This commit is contained in:
Julius Marminge committed 2026-02-13 00:19:32 -08:00
1 parent 6b916d3a6f
commit 4fff00c8c3
1 file changed
+6 -1
+6 -1
View File
@@ -83,7 +83,12 @@ function startBackend(): void {
const child = spawn(process.execPath, [BACKEND_ENTRY], {
cwd: ROOT_DIR,
env: backendEnv(),
// In Electron main, process.execPath points to the Electron binary.
// Run the child in Node mode so this backend process does not become a GUI app instance.
env: {
...backendEnv(),
ELECTRON_RUN_AS_NODE: "1",
},
stdio: "inherit",
});
backendProcess = child;