toasts hens
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

electron-serve.js 427B

1234567891011121314151617181920212223
  1. const {app, BrowserWindow} = require('electron');
  2. const serve = require('electron-serve');
  3. const loadURL = serve({directory: 'hen'});
  4. let mainWindow;
  5. (async () => {
  6. await app.whenReady();
  7. mainWindow = new BrowserWindow({
  8. width: 1280,
  9. height: 720
  10. });
  11. await loadURL(mainWindow);
  12. // The above is equivalent to this:
  13. await mainWindow.loadURL('app://-');
  14. // The `-` is just the required hostname
  15. })();