1.0.2 • Published 8 years ago

datland-swarm-defaults v1.0.2

Weekly downloads
24
License
BSD-3-Clause
Repository
github
Last release
8 years ago

DatLand Swarm Defaults

DatLand Swarm Defaults gives you the Dat defaults for Discovery-Swarm. This will set your dns and dht servers making it easy to discover other peers.

Usage

Create a config object and pass it to discovery swarm.

Any options you specify will overwrite the defaults. See discovery swarm for options.

var Swarm = require('discovery-swarm')
var swarmDefaults = require('datland-swarm-defaults')

// Create a Hyperdrive here

var config = swarmDefaults({
  stream: function () {
    return drive.createPeerStream()
  }
})
var swarm = Swarm(config)

See a full Dat example