electron node modules in renderer code example
Example 1: electron-packager
# For use in npm scripts (recommended)
npm install electron-packager --save-dev
# For use from the CLI
npm install electron-packager -g
Example 2: electron load index.html
mainWindow.loadFile(path.join(__dirname, 'index.html'));