Skip to content

Instantly share code, notes, and snippets.

@jaketrent
Created February 23, 2018 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaketrent/5157da2aeaf41bb6e7ad80dfc7ef080d to your computer and use it in GitHub Desktop.
Save jaketrent/5157da2aeaf41bb6e7ad80dfc7ef080d to your computer and use it in GitHub Desktop.
Simple electron main.js
const electron = require('electron')
const app = electron.app
const BrowserWindow = electron.BrowserWindow
let mainWindow
app.on('ready', _ => {
mainWindow = new BrowserWindow({
height: 400,
width: 400
})
mainWindow.loadURL(`file://${__dirname}/countdown.html`)
mainWindow.on('closed', _ => {
mainWindow = null
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment