Files: 1e424e663092ab3b875ad4dae38a6df91d560e60 / 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/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('ssb-contacts')) |
20 | .use(require('./lib/progress-stream')) |
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