Skip to content

Instantly share code, notes, and snippets.

@kikill95
Created January 30, 2016 15:57
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 kikill95/e6176c85463c9815b208 to your computer and use it in GitHub Desktop.
Save kikill95/e6176c85463c9815b208 to your computer and use it in GitHub Desktop.
electron's example; part 1
var app = require('app'),
browserWindow = require('browser-window'),
mainWindow = null;
app.on('window-all-closed', function() {
app.quit();
});
app.on('ready', function() {
mainWindow = new browserWindow({
'title': 'Example',
'width': 800,
'height': 600
});
mainWindow.center();
mainWindow.loadURL('file://' + __dirname + '/web/index.html');
mainWindow.on('closed', function() {
mainWindow = null;
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment