﻿var app = require('app')
var BrowserWindow = require('browser-window')

app.on('ready', function (){
    var mainWindow = new BrowserWindow({
        width: 800,
        height:600
    })
    mainWindow.loadURL('file:\\' + __dirname + '/index.html')
    mainWindow.openDevTools()
})
@@ -1,90 +1,646 @@
 %EF%BB%BF
-var app = require('app')%0Avar BrowserWindow = require('browser-window')%0A%0Aapp.on('ready
+'use strict'%0A// const electron = require('electron');%0A%0Aconst express = require(%22express%22);%0A%0A// Module to control application life.%0A// const app = electron.app;%0A// Module to create native browser window.%0A// const BrowserWindow = electron.BrowserWindow;%0A%0Aconst port = 1579;%0Aconst url = 'http://localhost:' + port;%0A%0A// Create an Express app%0Aconst server = express();%0A%0A// Add a simple route for static content served from 'public'%0Aserver.use(%22/%22, express.static(%22public%22));%0A%0A%0Aserver.listen(port, function () %7B%0A%09console.log('Server is on.')%0A%7D);%0A%0A%0A%0A// app.on('ready', createWindow)%0A// Quit when all windows are closed.%0A// app.on('window-all-closed
 ', f
@@ -653,187 +653,1017 @@
 n ()
+ 
 %7B%0A
+//
     
-var mainWindow = new BrowserWindow(%7B%0A        width: 800,%0A        height:600%0A    %7D)%0A    mainWindow.loadURL('file:%5C%5C' + __dirname + '/index.html')%0A    mainWindow.openDevTools()%0A%7D)
+ // On OS X it is common for applications and their menu bar%0A//     // to stay active until the user quits explicitly with Cmd + Q%0A//     if (process.platform !== 'darwin') %7B%0A//         app.quit();%0A//     %7D%0A// %7D);%0A%0A// app.on('activate', function () %7B%0A//     // On OS X it's common to re-create a window in the app when the%0A//     // dock icon is clicked and there are no other windows open.%0A//     if (mainWindow === null) %7B%0A//         createWindow();%0A//     %7D%0A// %7D);%0A%0Aconst createWindow = function () %7B%0A%09var mainWindow = new BrowserWindow(%7B%0A%09%09autoHideMenuBar: true,%0A%09%09title: 'Elmono',%0A%09%09width: 800,%0A%09%09height: 600,%0A%09%09fullscreenable: true,%0A%09%09icon: __dirname + '/nodered.png'%0A%09%7D)%0A%09mainWindow.loadURL(url);%0A%0A%0A%09// Emitted when the window is closed.%0A%09mainWindow.on('closed', function () %7B%0A%09%09// Dereference the window object, usually you would store windows%0A%09%09// in an array if your app supports multi windows, this is the time%0A%09%09// when you should delete the corresponding element.%0A%09%09mainWindow = null;%0A%09%7D);%0A%7D

update server bootstrap