UNPKG

decentralized-internet

Version:

An NPM library of programs to create decentralized web and distributed computing projects

14 lines (10 loc) 189 B
'use strict'; const self = function (peer) { if (!peer) { throw new Error('Peer is missing.'); } return (req, res) => { res.send(peer.self); }; }; module.exports = self;