From 3f40697795696603c211e97657a5136a551207b4 Mon Sep 17 00:00:00 2001 From: zlm Date: Wed, 10 Jun 2026 15:13:30 +0800 Subject: [PATCH] fix: pipe backend logs to Electron terminal --- desktop/src/main.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/desktop/src/main.js b/desktop/src/main.js index 2e36a1b..317c767 100644 --- a/desktop/src/main.js +++ b/desktop/src/main.js @@ -29,10 +29,12 @@ function startBackend() { if (backend) return backend = spawn('node', [TSX, 'src/index.ts'], { cwd: PROJECT_DIR, - stdio: 'ignore', + stdio: ['ignore', 'pipe', 'pipe'], env: { ...process.env, PORT: process.env.PORT || '3000' }, windowsHide: true, }) + backend.stdout.pipe(process.stdout) + backend.stderr.pipe(process.stderr) isRunning = true updateMenu() backend.on('exit', () => { backend = null; isRunning = false; updateMenu() })