Skip to content

Instantly share code, notes, and snippets.

@ColdSauce
Created February 25, 2018 20:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ColdSauce/347d147c17ce9c24482620289702ca47 to your computer and use it in GitHub Desktop.
Save ColdSauce/347d147c17ce9c24482620289702ca47 to your computer and use it in GitHub Desktop.
Testing discovery swarm
var swarm = require('discovery-swarm')
var sw = swarm()
sw.listen(8048)
sw.join('dat://85471abf77e6f387e18184fd72d20b8b401add3fb1162cb941b4b868664928c2') // can be any id/name/hash
sw.on('connection', function (connection) {
console.log('found + connected to peer')
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment