Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dat-ecosystem-archive/dat-swarm-defaults
Dat Defaults for Discovery Swarm [ DEPRECATED - More info on active projects and modules at https://dat-ecosystem.org/ ]
https://github.com/dat-ecosystem-archive/dat-swarm-defaults
dat dat-protocol discovery-swarm hyperdrive
Last synced: 3 months ago
JSON representation
Dat Defaults for Discovery Swarm [ DEPRECATED - More info on active projects and modules at https://dat-ecosystem.org/ ]
- Host: GitHub
- URL: https://github.com/dat-ecosystem-archive/dat-swarm-defaults
- Owner: dat-ecosystem-archive
- License: mit
- Archived: true
- Created: 2016-03-03T00:14:11.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2022-01-06T16:24:40.000Z (about 3 years ago)
- Last Synced: 2024-06-11T20:31:03.640Z (8 months ago)
- Topics: dat, dat-protocol, discovery-swarm, hyperdrive
- Language: JavaScript
- Homepage:
- Size: 41 KB
- Stars: 27
- Watchers: 5
- Forks: 12
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-dat - dat-swarm-defaults - default configuration for dns and dht for use with `discovery-swarm` (Dat Core Modules / Networking)
README
[![deprecated](http://badges.github.io/stability-badges/dist/deprecated.svg)](https://dat-ecosystem.org/)
More info on active projects and modules at [dat-ecosystem.org](https://dat-ecosystem.org/)
---
# Dat Swarm Defaults
[![npm][npm-image]][npm-url]
[![travis][travis-image]][travis-url]
[![standard][standard-image]][standard-url]Use Dat defaults for `dns` and `dht` servers in [hyperdiscovery](https://github.com/datproject/hyperdiscovery) or [discovery-swarm](https://github.com/mafintosh/discovery-swarm). The *dns* and *dht* servers are used to discover other peers.
### Using Other Discovery Servers
Run discovery servers with [dns-discovery](https://github.com/mafintosh/dns-discovery#cli) or a [bittorrent-dht](https://github.com/webtorrent/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.
```javascript
var Swarm = require('discovery-swarm')
var defaults = require('dat-swarm-defaults')var config = defaults({
stream: function () {
return drive.createPeerStream()
}
})
var swarm = Swarm(config)
```## License
[MIT](LICENSE.md)
[npm-image]: https://img.shields.io/npm/v/dat-swarm-defaults.svg?style=flat-square
[npm-url]: https://www.npmjs.com/package/dat-swarm-defaults
[travis-image]: https://img.shields.io/travis/datproject/dat-swarm-defaults.svg?style=flat-square
[travis-url]: https://travis-ci.org/datproject/dat-swarm-defaults
[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square
[standard-url]: http://npm.im/standard