Skip to content

Instantly share code, notes, and snippets.

@lamarmarshall
Last active October 15, 2017 03:10
Show Gist options
  • Select an option

  • Save lamarmarshall/fd471c53827c3c4f9958e1ea258ccdd9 to your computer and use it in GitHub Desktop.

Select an option

Save lamarmarshall/fd471c53827c3c4f9958e1ea258ccdd9 to your computer and use it in GitHub Desktop.
nodejs electron starter
<!DOCTYPE html>
<html lang="en">
<head>
</head>
<body>
<h1>hello world</h1>
</body>
</html>
const electron = require('electron')
const {app, BrowserWindow} = electron
app.on('ready', () => {
let win = new BrowserWindow({width:800, height: 600 })
win.loadURL('file://${_dirname}/index.html')
})
{
"name": "test",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "electron index.js"
},
"author": "",
"license": "ISC",
"dependencies": {
"electron": "^1.7.9"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment