Started testing Electron

This commit is contained in:
Joel Collins 2019-02-15 13:04:00 +00:00
parent 11cd8708d9
commit bf74527b47
2 changed files with 18 additions and 1 deletions

15
src/app.js Normal file
View file

@ -0,0 +1,15 @@
const electron = require('electron')
const app = electron.app
const BrowserWindow = electron.BrowserWindow
let url
if (process.env.NODE_ENV === 'DEV') {
url = 'http://localhost:8080/'
} else {
url = `file://${process.cwd()}/dist/index.html`
}
app.on('ready', () => {
let window = new BrowserWindow({width: 800, height: 600})
window.loadURL(url)
})