1.1.0 • Published 7 years ago

url-dat v1.1.0

Weekly downloads
5
License
ISC
Repository
github
Last release
7 years ago

Urls to Dat

Put files from urls into a hyperdrive archive

See other modules for more info:

Usage

urlDat(urls, archive, cb)

var hyperdrive = require('hyperdrive')
var swarm = require('hyperdrive-archive-swarm')
var memdb = require('memdb')
var urlDat = require('url-dat')

var drive = hyperdrive(memdb())
var archive = drive.createArchive()

var urls = ['http://google.com', 'http://npmjs.com']

urlDat(urls, archive, function (err) {
  if (err) throw err
  archive.finalize(function (err) { 
    if (err) throw err
    console.log('sharing key: ', archive.key.toString('hex'))
    swarm(archive)
  })
})
1.1.0

7 years ago

1.0.1

7 years ago

1.0.0

8 years ago