Skip to content
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.
/ node-dns-sync Public archive
forked from skoranga/node-dns-sync

Sync version of DNS lookup. Useful for server startup activities.

License

Notifications You must be signed in to change notification settings

418sec/node-dns-sync

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-dns-sync

Build Status

Sync/Blocking DNS resolve. Main usecase is in node server startup.

How to Use

var dnsSync = require('dns-sync');

console.log(dnsSync.resolve('www.paypal.com'));     //should return the IP address
console.log(dnsSync.resolve('www.yahoo.com'));
console.log(dnsSync.resolve('www.non-host.something')); //should return null

console.log(dnsSync.resolve('www.google.com', 'AAAA')); //should return AAAA records
console.log(dnsSync.resolve('google.com', 'NS'));   //should return NS record

About

Sync version of DNS lookup. Useful for server startup activities.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%