git ssb

0+

alanz / patchwork



forked from Matt McKegg / patchwork

Tree: 5d9fedf4d44d3f1398e9591ab2462f01d6c63d5f

Files: 5d9fedf4d44d3f1398e9591ab2462f01d6c63d5f / server-process.js

1071 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('scuttlebot/plugins/invite'))
13 .use(require('scuttlebot/plugins/local'))
14 .use(require('scuttlebot/plugins/logging'))
15// .use(require('./lib/private-with-index'))
16// .use(require('./lib/query-with-progress'))
17 .use(require('ssb-query')) //using this instead of query-with-progress
18//.use(require('ssb-fulltext')) // disabled for now
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
31

Built with git-ssb-web