lookup-multicast-dns
Lookup an ip for a hostname using multicast-dns if it is a .local domain or otherwise use the dns module
npm install lookup-multicast-dns
OSX supports resolving .local domains using mdns per default but unfortunately not all other platforms have as good support for it. On Ubuntu you currently have to install and run the avahi-daemon which is why I wrote this module that allows you to always resolve them from javascript without relying on os support.
Usage
var lookup =
If you want the node core dns module to always support multicast-dns you can do the following
// core dns now always support resolving .local domainsvar dns =dns
Command line tool
There is also a command line tool available if you install globally
npm install -g lookup-multicast-dns
lookup-multicast-dns brunhilde.local
> 192.168.10.254
Related
Use register-multicast-dns to register a .local
domain
on another machine.
On one machine (let's pretend it has ip 192.168.10.456)
var register =
On another
var lookup =
License
MIT