Electron From Scratch Build Desktop Apps With Javascript Free Download [better]

When you're ready to share your app, you’ll want to turn it into an .exe or .app file. Tools like or Electron Builder are free to use and automate the entire process of bundling your code for users to download.

This is the engine that runs your JavaScript outside the browser. Download it here .

Electron is an open-source framework that allows you to create desktop applications using . It works by combining the Chromium rendering engine (the bones of Google Chrome) with Node.js .

Create an index.html file. This is exactly like a standard webpage:

const { app, BrowserWindow } = require('electron'); function createWindow() { const win = new BrowserWindow({ width: 800, height: 600, webPreferences: { nodeIntegration: true } }); win.loadFile('index.html'); } app.whenReady().then(createWindow); // Quit when all windows are closed, except on macOS app.on('window-all-closed', () => { if (process.platform !== 'darwin') app.quit(); }); Use code with caution. Step 5: Launch the App To run your app, add a start script to your package.json : "scripts": { "start": "electron ." } Use code with caution. Now, go back to your terminal and run: npm start Use code with caution.

You can interact with the file system, show notifications, and use the system tray.