Browse Source

clean up

master
Victor Giers 3 years ago
parent
commit
bf58006e72
2 changed files with 9 additions and 25 deletions
  1. 9
    6
      electron-serve.js
  2. 0
    19
      index.html

+ 9
- 6
electron-serve.js View File

@@ -8,13 +8,16 @@ const loadURL = serve({directory: 'hen'});
let mainWindow;

(async () => {
await app.whenReady();
await app.whenReady();

mainWindow = new BrowserWindow();
mainWindow = new BrowserWindow({
width: 1280,
height: 720
});

await loadURL(mainWindow);
await loadURL(mainWindow);

// The above is equivalent to this:
await mainWindow.loadURL('app://-');
// The `-` is just the required hostname
// The above is equivalent to this:
await mainWindow.loadURL('app://-');
// The `-` is just the required hostname
})();

+ 0
- 19
index.html View File

@@ -1,19 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'">
<meta http-equiv="X-Content-Security-Policy" content="default-src 'self'; script-src 'self'">
<title>Hello World!</title>
</head>
<body>
<h1>Hello World!</h1>
We are using Node.js <span id="node-version"></span>,
Chromium <span id="chrome-version"></span>,
and Electron <span id="electron-version"></span>.

<!-- You can also require other files to run in this process -->
<script src="./renderer.js"></script>
</body>
</html>

Loading…
Cancel
Save