Last active
August 13, 2022 20:54
-
-
Save samuraijane/6d01eae6c6ca4caed95ea3faf08e6e07 to your computer and use it in GitHub Desktop.
Core module example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const dns = require('node:dns'); | |
| const options = { | |
| family: 6, | |
| hints: dns.ADDRCONFIG | dns.V4MAPPED, | |
| }; | |
| dns.lookup('google.com', options, (err, address, family) => { | |
| console.log('address: %j family: IPv%s', address, family) | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment