git ssb

1+

mixmix / scuttle-shell



Tree: 62ff49458ab485251bd04867309ec994c88fec21

Files: 62ff49458ab485251bd04867309ec994c88fec21 / examples / service-discovery.js

321 bytesRaw
1module.exports = {
2 name: 'server-discovery',
3 version: '1.0.0',
4 init: function (sbot) {
5 sbot.ws.use(function (req, res, next) {
6 res.setHeader('Access-Control-Allow-Origin', '*')
7 if (req.url === '/get-address') {
8 res.end(sbot.ws.getAddress())
9 } else {
10 next()
11 }
12 })
13 }
14}

Built with git-ssb-web