| 2 | const { app, BrowserWindow } = require('electron'); |
| 3 | const path = require('path'); |
| 4 | function createWindow() { |
| 5 | // Create the browser window |
| 6 | const win = new BrowserWindow({ |
| 7 | width: 800, |
| 8 | height: 600, |
| 9 | webPreferences: { |
| 10 | nodeIntegration: true, |
| 11 | }, |
| 12 | }); |
| 13 | |
| 14 | // Load the index.html file |
| 15 | win.loadFile(path.resolve(__dirname, './layers/renderer/index.html')); |
| 16 | // Open the DevTools (remove this line in production) |
| 17 | win.webContents.openDevTools(); |
| 18 | } |
| 19 | |
| 20 | // Event handler for when the app is ready |
| 21 | app.whenReady().then(createWindow); |