Skip to content
Snippets Groups Projects
main.js 587 B
Newer Older
dl35's avatar
dl35 committed
const {app, BrowserWindow} = require('electron')
const path = require('path')

function createWindow() {
    // create the browser window
    const mainWindow = new BrowserWindow({
        width: 1000,
        height: 1000,
        webPreferences: {
            nodeIntegration: true,
            contextIsolation:false,
            preload: path.join(__dirname, 'preload.js')
        }
    })
    mainWindow.loadFile('index.html')

    mainWindow.webContents.openDevTools()
}

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

// app.whenReady().then(() => {
//     createWindow()
// });