git ssb

1+

punkmonk.termux / mvd



forked from ev / mvd

Commit e05454ed7ada31342abbdd6f4b904720bf675270

use decent-ws and share mvd client

Ev Bogue committed on 5/23/2018, 1:43:18 AM
Parent: 64e7cbf9b4b61071a582b3d0463dd1fc77fd46ad

Files changed

bin.jschanged
bin.jsView
@@ -14,9 +14,9 @@
1414 var config = require('./config/inject')(yargs.appname || 'decent')
1515
1616 config.keys = ssbKeys.loadOrCreateSync(path.join(config.path, 'secret'))
1717
18-var coraClient = fs.readFileSync(path.join('./build/index.html'))
18+var mvdClient = fs.readFileSync(path.join('./build/index.html'))
1919
2020 var manifestFile = path.join(config.path, 'manifest.json')
2121
2222 var argv = process.argv.slice(2)
@@ -37,20 +37,19 @@
3737 .use(require('ssb-ebt'))
3838 .use(require('ssb-ooo'))
3939 .use(require('scuttlebot/plugins/invite'))
4040 .use(require('scuttlebot/plugins/local'))
41- .use(require('decent-ssb/plugins/ws'))
41+ .use(require('decent-ws'))
4242 .use({
4343 name: 'serve',
4444 version: '1.0.0',
4545 init: function (sbot) {
4646 sbot.ws.use(function (req, res, next) {
47- var send = {}
48- send = config
47+ var send = config
4948 delete send.keys // very important to keep this, as it removes the server keys from the config before broadcast
5049 send.address = sbot.ws.getAddress()
5150 if(req.url == '/')
52- res.end(coraClient)
51+ res.end(mvdClient)
5352 if(req.url == '/get-config')
5453 res.end(JSON.stringify(send))
5554 else next()
5655 })

Built with git-ssb-web