From 438fd4740952cc708963113b1528991e2bf70704 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Naz=C4=B1m=20Gediz=20Ayd=C4=B1ndo=C4=9Fmu=C5=9F?= Date: Tue, 14 Feb 2023 16:13:52 +0300 Subject: [PATCH] Update main.js Implement a basic page --- main.js | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 5063213..31b6865 100644 --- a/main.js +++ b/main.js @@ -1 +1,17 @@ -console.log(`Hello from Electron 👋`) +// Importing modules +const { app, BrowserWindow } = require('electron') + +// Reusable function to instantiate windows +const createWindow = () => { + const win = new BrowserWindow({ + width: 800, + height: 600, + }) + + win.loadFile('index.html') +} + +// Call window instantiating function when the app is ready +app.whenReady().then(() => { + createWindow() +})