var http = require('http');
srvr = http.createServer(function (req, res) {
  res.write('Hello World!');
  res.end();
});
srvr.listen(8080);
console.log(srvr.listening);
srvr.close();
console.log(srvr.listening);

              
true
false