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:
37
server/nodejs/ecosystem.config.js
Normal file
37
server/nodejs/ecosystem.config.js
Normal 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
|
||||
}]
|
||||
};
|
||||
Reference in New Issue
Block a user