Files: 78f161513725070b23d7b626a71e1ee9cea8a74d / server-process.js
1172 bytesRaw
1 | var serveBlobs = require('./lib/serve-blobs') |
2 | var fs = require('fs') |
3 | var Path = require('path') |
4 | var electron = require('electron') |
5 | |
6 | var 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('patchcore/sbot-plugins/backlinks')) |
16 | .use(require('patchcore/sbot-plugins/private')) |
17 | .use(require('ssb-query')) //using this instead of query-with-progress |
18 | // .use(require('./lib/private-with-index')) |
19 | // .use(require('./lib/query-with-progress')) |
20 | //.use(require('ssb-fulltext')) // disabled for now |
21 | |
22 | module.exports = function (ssbConfig) { |
23 | var context = { |
24 | sbot: createSbot(ssbConfig), |
25 | config: ssbConfig |
26 | } |
27 | ssbConfig.manifest = context.sbot.getManifest() |
28 | serveBlobs(context) |
29 | fs.writeFileSync(Path.join(ssbConfig.path, 'manifest.json'), JSON.stringify(ssbConfig.manifest)) |
30 | electron.ipcRenderer.send('server-started', ssbConfig) |
31 | } |
32 |
Built with git-ssb-web