Last active
December 31, 2018 16:16
-
-
Save edsu/f58f9c51787eed29768393432eebc9c5 to your computer and use it in GitHub Desktop.
list ip addresses of connections in dat network
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
Dat = require('dat-node') | |
Dat('/Users/edsu/Dat/datproject.org', (err, dat) => { | |
dat.joinNetwork() | |
dat.network.on('connection', (conn, info) => { | |
console.log(info.host) | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment