git ssb

1+

mixmix / scuttle-shell



Tree: 4933e4b778bdb7bc249725e152a78612fe6fcb5c

Files: 4933e4b778bdb7bc249725e152a78612fe6fcb5c / 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