Skip to content

Commit aedbc0b

Browse files
committed
tweak the config to get things working (may need reverting)
1 parent 1ee31d3 commit aedbc0b

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

server.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ const scuttleshell = require('scuttle-shell')
44

55
// Get config options from depject
66
const config = require('./config').create().config.sync.load()
7+
const startFrontend = () => electron.ipcRenderer.send('server-started')
78

89
// Check if scuttle-shell is already running
910
// TODO - make this check for scuttle-shell specifically (and not just an sbot)
@@ -13,16 +14,14 @@ Client(config.keys, config, (err, server) => {
1314
console.warn('client connection failed:', err)
1415
console.log('> starting scuttle-shell')
1516
scuttleshell.start({}, (startErr) => {
16-
console.log('start done!', startErr)
17-
if (startErr) {
18-
console.error('failed to start scuttle-shell:', startErr)
19-
} else {
20-
electron.ipcRenderer.send('server-started')
21-
}
17+
if (startErr) return console.error('> scuttle-shell: failed to start', startErr)
18+
19+
startFrontend()
2220
})
2321
} else {
2422
console.log('> scuttle-shell / sbot already running')
2523
server.close() // close this connection (app starts one of its own)
26-
electron.ipcRenderer.send('server-started')
24+
25+
startFrontend()
2726
}
2827
})

0 commit comments

Comments
 (0)