fix: pipe backend logs to Electron terminal
This commit is contained in:
1 parent
3436d5bb6a
commit
3f40697795
1 file changed
+3
-1
+3
-1
@@ -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() })
|
||||
|
||||
Reference in new issue
Block a user