electron download tool code example

Example 1: electron setup cmd

1) Make sure node.js is installed on your machine

2) CD into your directory

3) Crete a json package using the following command:
npm init

4) Install the electron module using the following command:
npm install --save-dev electron

Example 2: electron

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Hello World!</title>
    <meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline';" />
</head>
<body style="background: white;">
    <h1>Hello World!</h1>
    We are using node <script>document.write(process.versions.node)</script>,
    Chrome <script>document.write(process.versions.chrome)</script>,
    and Electron <script>document.write(process.versions.electron)</script>.
</body>
</html>
Copiar