added lite version

This commit is contained in:
Marco Mooren
2026-05-27 15:04:14 +02:00
parent 3def9e0aac
commit 2e833b0bae
7 changed files with 47 additions and 13 deletions

View File

@@ -9,6 +9,14 @@ import { dirname, resolve } from 'node:path';
import { mkdirSync } from 'node:fs';
import 'dotenv/config';
// AbortErrors from undici/node-fetch can escape async route handlers when a
// client disconnects mid-stream (station switch). They are benign — the socket
// is already gone. Log everything else so genuine bugs are still visible.
process.on('unhandledRejection', (reason) => {
if (reason?.name === 'AbortError') return;
console.error('[electron] unhandledRejection:', reason);
});
const __dirname = dirname(fileURLToPath(import.meta.url));
// Pick data location BEFORE importing the server so its module-level path