git ssb

1+

mixmix / scuttle-shell



Tree: e442f556d84d713c6e4ae2a3e49aff43ec0b7831

Files: e442f556d84d713c6e4ae2a3e49aff43ec0b7831 / examples / service-discovery / index.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