added lite version
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user