Files: 8c71e9c979626faf9b3d2a3f9293a285ba56d033 / 2_actual_friends / server.js
708 bytesRaw
1 | const Server = require('scuttlebot') |
2 | const fs = require('fs') |
3 | const Path = require('path') |
4 | |
5 | const config = require('./config') |
6 | console.log('config:', config) |
7 | |
8 | console.log('*** installing ssb-server plugins ***') |
9 | Server |
10 | .use(require('scuttlebot/plugins/master')) |
11 | .use(require('./ssb-server-actual-friends')) |
12 | |
13 | console.log('*** starting ssb-server ***') |
14 | const server = Server(config) |
15 | |
16 | console.log('*** updating manifest ***') |
17 | // this is required for ssb-client to consume |
18 | // it's a list of methods that can be called remotely, without this code we won't be able to call our new plugin |
19 | const manifest = server.getManifest() |
20 | fs.writeFileSync(Path.join(config.path, 'manifest.json'), JSON.stringify(manifest)) |
21 |
Built with git-ssb-web