Check if a server is listening on the given params
npm install listening --save
var listening = require'listening';listening8080// res will be true/false;
Listening API follows server.listen API.
Why would we want to test for a listening server before starting our own server,
can't we just try to
.listen again later on?
The current answer for node 0.10.x is no you can't.
See the node.js issue.