UNPKG

decentralized-internet

Version:

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

16 lines (12 loc) 219 B
'use strict'; const status = function (peer) { if (!peer) { throw new Error('Peer is missing.'); } return (req, res) => { res.send({ status: peer.status() }); }; }; module.exports = status;