git ssb

0+

alanz / patchwork



forked from Matt McKegg / patchwork

Tree: 491fdc7f44dabd50a0d18ba7ca391b70ded5a6af

Files: 491fdc7f44dabd50a0d18ba7ca391b70ded5a6af / server-process.js

1015 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('scuttlebot/plugins/gossip'))
9 .use(require('scuttlebot/plugins/replicate'))
10 .use(require('ssb-friends'))
11 .use(require('ssb-blobs'))
12 .use(require('ssb-backlinks'))
13 .use(require('ssb-private'))
14 .use(require('scuttlebot/plugins/invite'))
15 .use(require('scuttlebot/plugins/local'))
16 .use(require('scuttlebot/plugins/logging'))
17 .use(require('ssb-query'))
18 .use(require('ssb-about'))
19 .use(require('./lib/progress-stream'))
20
21module.exports = function (ssbConfig) {
22 var context = {
23 sbot: createSbot(ssbConfig),
24 config: ssbConfig
25 }
26 ssbConfig.manifest = context.sbot.getManifest()
27 serveBlobs(context)
28 fs.writeFileSync(Path.join(ssbConfig.path, 'manifest.json'), JSON.stringify(ssbConfig.manifest))
29 electron.ipcRenderer.send('server-started', ssbConfig)
30}
31

Built with git-ssb-web