Commit e05454ed7ada31342abbdd6f4b904720bf675270
use decent-ws and share mvd client
Ev Bogue committed on 5/23/2018, 1:43:18 AMParent: 64e7cbf9b4b61071a582b3d0463dd1fc77fd46ad
Files changed
bin.js | changed |
bin.js | ||
---|---|---|
@@ -14,9 +14,9 @@ | ||
14 | 14 | var config = require('./config/inject')(yargs.appname || 'decent') |
15 | 15 | |
16 | 16 | config.keys = ssbKeys.loadOrCreateSync(path.join(config.path, 'secret')) |
17 | 17 | |
18 | -var coraClient = fs.readFileSync(path.join('./build/index.html')) | |
18 | +var mvdClient = fs.readFileSync(path.join('./build/index.html')) | |
19 | 19 | |
20 | 20 | var manifestFile = path.join(config.path, 'manifest.json') |
21 | 21 | |
22 | 22 | var argv = process.argv.slice(2) |
@@ -37,20 +37,19 @@ | ||
37 | 37 | .use(require('ssb-ebt')) |
38 | 38 | .use(require('ssb-ooo')) |
39 | 39 | .use(require('scuttlebot/plugins/invite')) |
40 | 40 | .use(require('scuttlebot/plugins/local')) |
41 | - .use(require('decent-ssb/plugins/ws')) | |
41 | + .use(require('decent-ws')) | |
42 | 42 | .use({ |
43 | 43 | name: 'serve', |
44 | 44 | version: '1.0.0', |
45 | 45 | init: function (sbot) { |
46 | 46 | sbot.ws.use(function (req, res, next) { |
47 | - var send = {} | |
48 | - send = config | |
47 | + var send = config | |
49 | 48 | delete send.keys // very important to keep this, as it removes the server keys from the config before broadcast |
50 | 49 | send.address = sbot.ws.getAddress() |
51 | 50 | if(req.url == '/') |
52 | - res.end(coraClient) | |
51 | + res.end(mvdClient) | |
53 | 52 | if(req.url == '/get-config') |
54 | 53 | res.end(JSON.stringify(send)) |
55 | 54 | else next() |
56 | 55 | }) |
Built with git-ssb-web