Harden MVP runtime and fix packaged desktop white screen

This commit is contained in:
Ryan Lancaster
2026-03-18 13:05:14 -04:00
parent 9302a88aea
commit 4a7b3061ed
14 changed files with 359 additions and 29 deletions

View File

@@ -15,7 +15,8 @@ if (args.has('--help') || args.has('-h')) {
process.exit(0);
}
const API_BASE = process.env.API_BASE || 'http://localhost:4000/api';
const backendPort = process.env.PORT_BACKEND || '4000';
const API_BASE = process.env.API_BASE || `http://localhost:${backendPort}/api`;
const HEALTH_URL = API_BASE.replace(/\/api\/?$/, '') + '/health';
const WRITE_API_KEY = process.env.WRITE_API_KEY || '';
const SHOULD_RESTART = args.has('--restart-backend');