const { app, ipcMain, BrowserWindow } = require('electron'); const path = require('node:path'); const http = require('node:http'); function createWindow () { const mainWindow = new BrowserWindow({ webPreferences: { webSecurity: false, preload: path.join(__dirname, 'preload.js') } }); mainWindow.loadFile('index.html'); mainWindow.webContents.on('render-process-gone', () => { process.exit(1); }); } const server = http.createServer((_req, res) => { res.end('