Ive got a hypercloud server running on my localhost
in the same thread, I run the following code:
exports.downloadDatFromSwarm = function (key, { timeout = 5e3 }, cb) {
var dir = fs.mkdtempSync(os.tmpdir() + path.sep + 'beaker-test-')
Dat(dir, { key, db: memdb() }, (err, dat) => {
if (err) return cb(err)