Package Exports
- dat-swarm-defaults
- dat-swarm-defaults/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (dat-swarm-defaults) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
More info on active projects and modules at dat-ecosystem.org
Dat Swarm Defaults
Use Dat defaults for dns and dht servers in hyperdiscovery or discovery-swarm. The dns and dht servers are used to discover other peers.
Using Other Discovery Servers
Run discovery servers with dns-discovery or a bittorrent-dht server (such as https://github.com/hyperswarm/dht).
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 defaults = require('dat-swarm-defaults')
var config = defaults({
stream: function () {
return drive.createPeerStream()
}
})
var swarm = Swarm(config)