npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

@datproject/dat-swarm-defaults

1.0.0

@jhand

npmHomeRepoSnykSocket
Downloads:10
$ npm install @datproject/dat-swarm-defaults
DailyWeeklyMonthlyYearly

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.

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)