DNS is an internet service that maps domain names, like rosettacode.org, to IP addresses, like 66.220.0.231.

Use DNS to resolve www.kame.net to both IPv4 and IPv6 addresses. Print these addresses.




 
# runs under node.js
dns = require 'dns'
 
dns.resolve4 'www.kame.net', (err, addresses) ->
  console.log 'IP4'
  console.log addresses
 
dns.resolve6 'www.kame.net', (err, addresses) ->
  console.log 'IP6'
  console.log addresses
 