1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-14 02:06:29 +00:00

Refactor main process and add exception handler for Socket server

This commit is contained in:
Dick Choi
2015-12-19 00:54:11 +09:00
parent be3c519a57
commit 16bcd86792
5 changed files with 275 additions and 116 deletions

View File

@@ -6,7 +6,7 @@ const app = electron.app
const ipcMain = electron.ipcMain
const Tray = electron.Tray
const path = require('path')
const nodeIpc = require('node-ipc')
const nodeIpc = require('@rokt33r/node-ipc')
var isFinderLoaded = false
@@ -18,6 +18,13 @@ nodeIpc.connectTo(
'main',
path.join(app.getPath('userData'), 'boost.service'),
function () {
nodeIpc.of.main.on(
'error',
function (err) {
nodeIpc.log('<< ## err ##'.rainbow, nodeIpc.config.delay)
nodeIpc.log(err)
}
)
nodeIpc.of.main.on(
'connect',
function () {