UNPKG

decentralized-internet

Version:

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

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