gun-relays

1.0.2 • Public • Published

gun-relays

Returns volunteer GUN relays for use in your decentralized apps.

Usage

npm i gun-relays

Node

import Relays, {forceListUpdate} from 'gun-relays'
import Gun from 'gun'

let relays = await Relays()

console.log(relays)

// Use the relays
let gun = new Gun({peers: relays})

// We can also force an update to the in-network data by pulling straight from the volunteer dht
let freshRelays = await forceListUpdate()
// The `Relays()` function is better suited for everyday use, but it greatly benefits the network if the data is refreshed every once in a while.

Browser

// Coming soon

See the official Wiki here: https://github.com/amark/gun/wiki/volunteer.dht

Package Sidebar

Install

npm i gun-relays

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

4.43 kB

Total Files

5

Last publish

Collaborators

  • draeder