Name: ssb-ws
Owner: Secure Scuttlebutt Consortium
Description: ssb-ws & http server for ssb
Created: 2016-07-02 08:34:46.0
Updated: 2018-04-11 02:48:38.0
Pushed: 2018-04-16 06:05:11.0
Size: 36
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
ssb-ws & http server for ssb.
Work In Progress
plugins.install ssb-ws
make sure you set a port in your config file (~/.ssb/config).
s": {"port": 8989}
sometimes you need to do http, here is an example sbot plugin that exposes the websocket address.
ire('scuttlebot')
se(require('ssb-ws'))
se({
name: 'test123',
version: '1.0.0',
init: function (sbot) {
sbot.ws.use(function (req, res, next) {
if(req.url == '/get-address')
res.end(sbot.ws.getAddress())
else next()
})
}
MIT