git ssb

10+

Matt McKegg / patchwork



Tree: ce375da17a50a713361509fbf70ff5ccf225d1f4

Files: ce375da17a50a713361509fbf70ff5ccf225d1f4 / server-process.js

1030 bytesRaw
1var serveBlobs = require('./lib/serve-blobs')
2var fs = require('fs')
3var Path = require('path')
4var electron = require('electron')
5
6var createSbot = require('scuttlebot')
7 .use(require('scuttlebot/plugins/master'))
8 .use(require('./lib/persistent-gossip')) // override
9 .use(require('./lib/friends-with-gossip-priority'))
10 .use(require('scuttlebot/plugins/replicate'))
11 .use(require('ssb-blobs'))
12 .use(require('scuttlebot/plugins/invite'))
13 .use(require('scuttlebot/plugins/block'))
14 .use(require('./lib/local-with-list'))
15 .use(require('scuttlebot/plugins/logging'))
16 .use(require('scuttlebot/plugins/private'))
17 .use(require('ssb-links'))
18 .use(require('ssb-query'))
19
20module.exports = function (ssbConfig) {
21 var context = {
22 sbot: createSbot(ssbConfig),
23 config: ssbConfig
24 }
25 ssbConfig.manifest = context.sbot.getManifest()
26 serveBlobs(context)
27 fs.writeFileSync(Path.join(ssbConfig.path, 'manifest.json'), JSON.stringify(ssbConfig.manifest))
28 electron.ipcRenderer.send('server-started', ssbConfig)
29}
30

Built with git-ssb-web