Using the dns Module

If you want a Node.js application to resolve DNS domain names, look up domains, or do reverse lookups, then you will find the dns module very helpful. A DNS lookup contacts the domain name server and requests records about a specific domain name. A reverse lookup contacts the domain name server and requests the DNS name associated with an IP address. The dns module provides functionality for most of the lookups you may need to perform. Table 10.2 lists the methods, their syntax, and what they do.

Image
Image

Table 10.2 Methods that can ...

Get Node.js, MongoDB, and AngularJS Web Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.