1. Initialize project (npm init)

2. install electron frame (npm install --save-dev electron)

3. hold package Configuration file startup entry changed to "start": "electron ."

4. Prepare entry document (index/main).js
const { app, BrowserWindow } = require('electron') //
Keep it right window A global reference to an object , If not , When JavaScript The object is // When it comes to recycling ,window The object will be closed automatically let win
function createWindow () { // Create browser window . win = new BrowserWindow({ width: 800,
height: 600 }) // Then load the index.html. win.loadFile('index.html') // Open developer tools
win.webContents.openDevTools()// When window Shut down , This event will be triggered . win.on('closed', () => {
// Dereference window object , If your application supports multiple windows , // It's usually more than one window Objects are stored in an array , //
meanwhile , You should delete the corresponding elements . win = null }) } // Electron After initialization and preparation // When creating a browser window , Call this function . //
part API stay ready It can only be used after the event is triggered . app.on('ready', createWindow) // Exit when all windows are closed . app.on(
'window-all-closed', () => { // stay macOS upper , Unless the user uses Cmd + Q Exit with certainty , //
Otherwise, most applications and their menu bar will remain active . if (process.platform !== 'darwin') { app.quit() } }) app.on(
'activate', () => { // stay macOS upper , When you click dock Icon and no other windows open , // A window is usually recreated in the application . if
(win ===null) { createWindow() } })
5. Create the html Interface
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Hello World!</title
> </head> <body> <h1>Hello World!</h1> </body> </html>
6. function npm Start command (npm start)

Technology
©2019-2020 Toolsou All rights reserved,
vue Value transfer between parent-child and non parent-child components about Bellman-Ford Personal understanding of algorithms Map---Java judge Map Contains a keyC#/.NET System optimization (redis Chapter 6 data structure 【List】) subversion ! Never take a nap longer than this time ! Watch out for fatal diseases …fio Use details python read , write in txt Text content Redis Counter High concurrency applications mysql Recursively finds all child nodes of the parent class ElementUI In the select Of label value