Skip to content

Instantly share code, notes, and snippets.

@mikeal
Created April 24, 2018 22:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikeal/a9e73d7e6fb89106fb8327d9577e77b7 to your computer and use it in GitHub Desktop.
Save mikeal/a9e73d7e6fb89106fb8327d9577e77b7 to your computer and use it in GitHub Desktop.
Application file for Vue.js Electron demo app.
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)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment