Skip to content

Instantly share code, notes, and snippets.

@muni2explore
Last active March 23, 2019 03:23
Show Gist options
  • Select an option

  • Save muni2explore/c22c3079b15b2b61abe03b10c35912fb to your computer and use it in GitHub Desktop.

Select an option

Save muni2explore/c22c3079b15b2b61abe03b10c35912fb to your computer and use it in GitHub Desktop.
Eelectron

Creating An App

npm init -y

npm install electron -D

touch index.js

npx electron index.js

Create Window

const {app, BrowserWindow} = require('electron');

let win;

function createWindow() {
    win = new BrowserWindow({
        width: 800,
        height: 600,
        title: 'My Electron App'
    });

    //win.loadURL(`file://${__dirname}/index.html`);
    win.loadURL('https://google.com');
}

app.on('ready', createWindow);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment