-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
31 lines (27 loc) · 837 Bytes
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
const { app, BrowserWindow } = require('electron')
const MAC_OS = 'darwin'
const createWindow = () => {
// Create the browser window.
const win = new BrowserWindow({
width: 1150,
height: 800
})
try {
const developmentURL = 'http://localhost:3000'
// const productionURL = ''
win.loadURL(developmentURL)
} catch (error) {
console.error(error)
}
}
// Start the application
app.whenReady().then(createWindow)
// Quit the application when all windows are closed.
app.on('window-all-closed', () => {
// On macOS it is common for applications and their menu bar
// to stay active until the user quits explicitly with Cmd + Q
// or by clicking the "Quit" menu item in the application menu.
if (process.platform !== MAC_OS) {
app.quit()
}
})