Contains the absolute minimum code required to make an electron app.
<!doctype html>
<html lang="en-us">
<head>
<meta charset="utf-8" />
<meta name="author" content="me" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>First App</title>
</head>
<body>
<p>Hello.</p>
<body>
</html>
const {
app, BrowserWindow
} = require("electron");
const path = require("path");
const url = require("url");
function createWindow() {
browserWindow = new BrowserWindow({
width: 800, height: 550
});
browserWindow.loadURL(url.format({
pathname: path.join(__dirname, "main.html"),
protocol: "file:",
slashes: true
}));
}
app.on("ready", createWindow);