Files: 42a6e511880c97c5b0b5d8ba131f7173b493ede4 / background-process.js
1021 bytesRaw
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('ssb-friends')) |
12 | .use(require('ssb-blobs')) |
13 | .use(require('ssb-backlinks')) |
14 | .use(require('ssb-private')) |
15 | .use(require('scuttlebot/plugins/invite')) |
16 | .use(require('scuttlebot/plugins/local')) |
17 | .use(require('scuttlebot/plugins/logging')) |
18 | .use(require('ssb-query')) |
19 | .use(require('ssb-about')) |
20 | .use(require('ssb-search')) |
21 | // .use(require('ssb-ebt')) |
22 | .use(require('ssb-ws')) |
23 | .use(require('ssb-chess-db')) |
24 | |
25 | // pull config options out of depject |
26 | var config = require('./config').create().config.sync.load() |
27 | |
28 | var sbot = createSbot(config) |
29 | var manifest = sbot.getManifest() |
30 | fs.writeFileSync(Path.join(config.path, 'manifest.json'), JSON.stringify(manifest)) |
31 | electron.ipcRenderer.send('server-started') |
32 |
Built with git-ssb-web