code-dumps/nodejs/dnslookup.js
2023-04-21 13:01:56 +08:00

3 lines
121 B
JavaScript

const dns = require('dns');
dns.lookup('blog.headdesk.me', (err,address,family) => console.log('results: %s', address));