git ssb

1+

mixmix / scuttle-shell



Tree: 18d14f4199837cdee84531b77b1c5e083944bbc1

Files: 18d14f4199837cdee84531b77b1c5e083944bbc1 / 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