Skip to content

Instantly share code, notes, and snippets.

@arikon
Created March 8, 2015 14:08
Show Gist options
  • Save arikon/885838622990f610bbca to your computer and use it in GitHub Desktop.
Save arikon/885838622990f610bbca to your computer and use it in GitHub Desktop.
IPv6 and IPv4 listen test
var http = require('http');
var server = http
.createServer(function(req, res) {
console.log(req.method, req.url);
res.end('Ok!');
})
.listen(9000, '::', function(err) {
err && console.log(err.stack);
console.log(server.address());
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment