const { app, BrowserWindow} = require('electron')
const path = require("path");

let win

var sur_url = "http://127.0.0.1:8001/"

function createWindow () {
  win = new BrowserWindow({
    width: 1600,
    height: 900,
    webPreferences: {
      nodeIntegration: true,
      preload: path.join(__dirname, "p_utils_preload.js"),
    },
  })
  
  //win.maximize();
  //win.webContents.openDevTools()

  win.on('closed', () => {
    win = null
  })

  //win.loadURL(sur_url+'manager/electron/')
  win.loadFile('data/html/start.html')
}

app.commandLine.appendSwitch ("disable-http-cache");

app.on('ready', ()=>{
  createWindow();
})