22 lines
425 B
JavaScript
22 lines
425 B
JavaScript
const {app, BrowserWindow} = require('electron');
|
|
const serve = require('electron-serve');
|
|
|
|
const loadURL = serve({directory: 'hen'});
|
|
|
|
let mainWindow;
|
|
|
|
(async () => {
|
|
await app.whenReady();
|
|
|
|
mainWindow = new BrowserWindow({
|
|
width: 1280,
|
|
height: 960
|
|
});
|
|
|
|
await loadURL(mainWindow);
|
|
|
|
// The above is equivalent to this:
|
|
await mainWindow.loadURL('app://-');
|
|
// The `-` is just the required hostname
|
|
})();
|