Advertisement
Guest User

main.js

a guest
Feb 25th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const electron = require('electron')
  2. const {app, BrowserWindow, menu} = electron
  3.  
  4. const path = require('path')
  5. const url = require('url')
  6.  
  7. let win
  8.  
  9. function createWindow() {
  10.     win = new BrowserWindow({
  11.         width:800,
  12.         height:600,
  13.         resizable: false,
  14.         icon: __dirname+'app/assets/images/favicon.ico'
  15.     });
  16.  
  17. //  win.setMenu(null);
  18.  
  19.     win.loadURL(
  20.         url.format({
  21.             pathname: path.join(__dirname,'app/index.html'),
  22.             protocol: 'file',
  23.             slashes: true
  24.         })
  25.     );
  26. }
  27.  
  28. app.on('ready', createWindow)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement