Skip to content

Instantly share code, notes, and snippets.

@Arkotek
Created August 22, 2019 16:08
Show Gist options
  • Save Arkotek/a60a7d944cf09e3b65bd40b46a9f4f41 to your computer and use it in GitHub Desktop.
Save Arkotek/a60a7d944cf09e3b65bd40b46a9f4f41 to your computer and use it in GitHub Desktop.
var connectionDetector = require('connection-detector')
connectionDetector.analyze((err, data) => {
// data is the output
})
[{
name: 'mongodb',
pid : 15646,
connections: [{
'17.249.28.32:5223' : { in: '20kb', out: '2mb'},
'74.125.195.188:3456' : { in: '204kb', out: '1mb'},
'127.0.0.1:1345' : { in: '10kb', out: '10mb'}
}]
}, {
name: 'node app.js',
pid : 15451,
connections: [{
'127.0.0.1:27017' : { in: '20kb', out: '2mb'} ,
'134.2.3.54:345' : { in: '2kb', out: '40b' }
}]
}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment