Made with ♥︎ by GitHub.
In Electron, the process that runs package.json’s main script is called the main process. The script that runs in the main process can display a GUI by creating web pages.
tl;dr: This is the node.js application - the backend
Since Electron uses Chromium for displaying web pages, Chromium’s multi-process architecture is also used. Each web page in Electron runs in its own process, which is called the renderer process.
tl;dr: This is the frontend browser stuff
...as of Mar 2016
your-app/
├── package.json
├── main.js
└── index.html
{
"name" : "your-app",
"version" : "0.1.0",
"main" : "main.js"
}
npm start
The package.json
Start app with
'use strict';
const electron = require('electron');
const app = electron.app; // Module to control application life.
const BrowserWindow = electron.BrowserWindow;
var mainWindow = null;
// Quit when all windows are closed.
app.on('window-all-closed', function() {
app.quit();
});
// This method will be called when Electron has finished
// initialization and is ready to create browser windows.
app.on('ready', function() {
// Create the browser window.
mainWindow = new BrowserWindow({width: 800, height: 600});
// and load the index.html of the app.
mainWindow.loadURL('file://' + __dirname + '/index.html');
});
The Native Node Modules problem is abstracted away from you during the build process.
no sweat
%APPDATA% on Windows
Actual App Path
[appData]/[AppName]
Where you can store application data
Since we use Chromium these APIs are guaranteed to be there and work
Will significantly affect the size of your self-install package as static-built binaries are big
{
"url": "http://mycompany.com/latest",
"name": "2.0.2",
"notes": "Theses are some release notes innit",
"pub_date": "2016-03-31T21:29:53+01:00"
}
Server Response
Elevator Pitch
Operations
Environment
Thank you
Questions?