Create a .env
file in the root of the directory. Find .env.example
.
npm install
npx electron-rebuild
npm run electron-pack
– build react app and wrap it with electron. Powered byelectron-builder
npm install
npx electron-rebuild
npm start
– starts react-dev-server and electron starts listening to port3001
package.json – "build"
– configuration of theelectron-builder
public/electron-main.js
– entry point of Electron app. –src/index.js
– entry point of React app
- ElectronJS – Main documentation
- electron-sudo – Run a subprocess with administrative privileges, prompting the user with a graphical OS dialog if necessary. Useful for background subprocesse which run native Electron apps that need sudo.
- electron-builder – Builder utility
- how to add third-party dependencies - https://www.electron.build/configuration/contents#extraresources
- Pritunl – this is the example how openvpn .exe file used by Pritunl client powered on Electron