git ssb

1+

mixmix / scuttle-shell



Tree: 04c856a1719140d352b6585b40d1c34edba1d0e0

Files: 04c856a1719140d352b6585b40d1c34edba1d0e0 / 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