Files: 3ff1094a6a4aa935685add17ed2bdf6e29bd0e9f / server-process.js
1047 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/friends')) |
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('scuttlebot/plugins/local')) |
15 | .use(require('scuttlebot/plugins/logging')) |
16 | .use(require('scuttlebot/plugins/private')) |
17 | .use(require('ssb-links')) |
18 | .use(require('ssb-query')) |
19 | .use(require('ssb-fulltext')) |
20 | |
21 | module.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