Improve UX: hide console window and fade connection status

- Hide console window on compiled desktop app (console=False in spec)
- Add 20-second auto-fade to "Connected" status in OBS display
- Keep "Disconnected" status visible until reconnection
- Add PM2 deployment configuration and documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-12-26 17:04:28 -08:00
parent 64c864b0f0
commit 478146c58d
5 changed files with 627 additions and 1 deletions

View File

@@ -0,0 +1,37 @@
module.exports = {
apps: [{
name: 'transcription-server',
script: 'server.js',
cwd: '/home/shadowdao/local-transcription/server/nodejs', // ← Update this path
exec_mode: 'fork',
instances: 1,
autorestart: true,
watch: false,
max_memory_restart: '512M', // ← Increased (transcription data in memory)
kill_timeout: 5000, // ← Give time for WebSocket cleanup
wait_ready: false,
listen_timeout: 5000,
env: {
NODE_ENV: 'development',
PORT: 3000,
DATA_DIR: '/home/shadowdao/local-transcription/server/nodejs/data', // ← Data directory
NODE_OPTIONS: '--max-old-space-size=400' // ← Increased memory
},
env_production: {
NODE_ENV: 'production',
PORT: 3000,
DATA_DIR: '/home/shadowdao/local-transcription/server/nodejs/data',
NODE_OPTIONS: '--max-old-space-size=400'
},
log_file: '/home/shadowdao/logs/transcription/app.log',
error_file: '/home/shadowdao/logs/transcription/error.log',
out_file: '/home/shadowdao/logs/transcription/out.log',
log_date_format: 'YYYY-MM-DD HH:mm:ss Z',
log_type: 'json',
merge_logs: true,
max_restarts: 10, // ← More retries (WebSocket can be finicky)
min_uptime: '10s',
// Graceful shutdown for WebSocket connections
shutdown_with_message: true
}]
};