Let your data swarm like your users do.
npm install --save peer-cached-api
var PeerCachedClient = require('peer-cached-api/client');
This library requires an external request module that uses a "request
like" interface. More modern libraries can be used through polymorphic-request. Client options support Hyperdrive options.
var client = new PeerCachedClient({ //hypercore options
name: 'just-a-test',
persist: false
});
client.requestInstance = request; //request instance
client.request({ //request options
uri:'http://localhost:8080/someapi',
json: true
}, function(err, res, body){
//do something with the data
});
mocha
Enjoy,
-Abbey Hawk Sparrow