diff --git a/desktop/src/main.ts b/desktop/src/main.ts index 9bc513a..f49ba0f 100644 --- a/desktop/src/main.ts +++ b/desktop/src/main.ts @@ -28,7 +28,7 @@ function startBackend(): void { backend = spawn('npx', ['tsx', 'src/index.ts'], { cwd: PROJECT_DIR, stdio: ['ignore', 'pipe', 'pipe'], - env: { ...process.env, PORT: '3000', SKIP_PLC: '1' }, + env: { ...process.env, PORT: process.env.PORT || '3000' }, shell: process.platform === 'win32', // Windows 需要 shell 运行 .cmd 文件 windowsHide: true, })