git ssb

16+

Dominic / patchbay



Commit 2fc72eabdc230a249add2e43b028b0a467a317c2

rename background-process.js server.js

mixmix committed on 10/29/2018, 5:20:55 AM
Parent: 2840c9e48caac44fec4836e75b31d7e2d75039e0

Files changed

index.jschanged
main.jschanged
background-process.jsdeleted
server.jsadded
index.jsView
@@ -75,9 +75,9 @@
7575 })
7676
7777 function startBackgroundProcess () {
7878 if (!windows.background) {
79- windows.background = openWindow(Path.join(__dirname, 'background-process.js'), {
79 + windows.background = openWindow(Path.join(__dirname, 'server.js'), {
8080 connect: false,
8181 center: true,
8282 fullscreen: false,
8383 fullscreenable: false,
main.jsView
@@ -33,20 +33,21 @@
3333 module.exports = patchbay
3434
3535 // for electro[n]
3636 if (typeof window !== 'undefined') {
37- // modules loaded first over-ride core modules loaded later
38- const sockets = combine(
37 + // TODO spin up settings check which modules are wanted
38 + const plugins = [
3939 require('patchbay-scry'),
4040 require('patchbay-dark-crystal'),
4141 require('patchbay-poll'),
42 + require('patch-inbox'), // TODO needs work
4243 require('ssb-chess-mithril'),
43- require('patchbay-gatherings'),
4444 require('patchbay-book'),
45- require('patch-inbox'), // TODO needs work
46- patchbay,
47- patchcore
48- )
45 + require('patchbay-gatherings')
46 + ]
47 + const args = [ ...plugins, patchbay, patchcore ]
48 + // plugings loaded first will over-ride core modules loaded later
49 + const sockets = combine.apply(null, args)
4950
5051 const api = entry(sockets, nest('app.html.app', 'first'))
5152 document.body.appendChild(api.app.html.app())
5253 }
background-process.jsView
@@ -1,34 +1,0 @@
1-var fs = require('fs')
2-var Path = require('path')
3-var electron = require('electron')
4-
5-console.log('STARTING SBOT')
6-
7-var createSbot = require('scuttlebot')
8- .use(require('scuttlebot/plugins/master'))
9- .use(require('scuttlebot/plugins/gossip'))
10- .use(require('scuttlebot/plugins/replicate'))
11- .use(require('scuttlebot/plugins/invite'))
12- .use(require('scuttlebot/plugins/local'))
13- .use(require('scuttlebot/plugins/logging'))
14- .use(require('ssb-about'))
15- .use(require('ssb-backlinks'))
16- .use(require('ssb-blobs'))
17- .use(require('ssb-chess-db'))
18- .use(require('ssb-ebt'))
19- .use(require('ssb-friends'))
20- .use(require('ssb-meme'))
21- .use(require('ssb-private'))
22- .use(require('ssb-query'))
23- .use(require('ssb-search'))
24- .use(require('ssb-unread'))
25- .use(require('ssb-ws'))
26- // .use(require('ssb-mutual')) // this is has recursion problems atm
27-
28-// pull config options out of depject
29-var config = require('./config').create().config.sync.load()
30-
31-var sbot = createSbot(config)
32-var manifest = sbot.getManifest()
33-fs.writeFileSync(Path.join(config.path, 'manifest.json'), JSON.stringify(manifest))
34-electron.ipcRenderer.send('server-started')
server.jsView
@@ -1,0 +1,35 @@
1 +// formerly background-process.js
2 +var fs = require('fs')
3 +var Path = require('path')
4 +var electron = require('electron')
5 +
6 +console.log('STARTING SBOT')
7 +
8 +var createSbot = require('scuttlebot')
9 + .use(require('scuttlebot/plugins/master'))
10 + .use(require('scuttlebot/plugins/gossip'))
11 + .use(require('scuttlebot/plugins/replicate'))
12 + .use(require('scuttlebot/plugins/invite'))
13 + .use(require('scuttlebot/plugins/local'))
14 + .use(require('scuttlebot/plugins/logging'))
15 + .use(require('ssb-about'))
16 + .use(require('ssb-backlinks'))
17 + .use(require('ssb-blobs'))
18 + .use(require('ssb-chess-db'))
19 + .use(require('ssb-ebt'))
20 + .use(require('ssb-friends'))
21 + .use(require('ssb-meme'))
22 + .use(require('ssb-private'))
23 + .use(require('ssb-query'))
24 + .use(require('ssb-search'))
25 + .use(require('ssb-unread'))
26 + .use(require('ssb-ws'))
27 + // .use(require('ssb-mutual')) // this is has recursion problems atm
28 +
29 +// pull config options out of depject
30 +var config = require('./config').create().config.sync.load()
31 +
32 +var sbot = createSbot(config)
33 +var manifest = sbot.getManifest()
34 +fs.writeFileSync(Path.join(config.path, 'manifest.json'), JSON.stringify(manifest))
35 +electron.ipcRenderer.send('server-started')

Built with git-ssb-web