$ brew update && brew upgrade
$ brew install dnsmasq
# defaults to: /usr/local/etc
$ mkdir -pv $(brew --prefix)/etc/
$ sudo mkdir -v /etc/resolver
(Assuming we are managing '.test' TLD)
# Add a new ‘address’ line for each TLD you want to add.
# IP address at the end, shows the node which hosts the TLD, or has DNS service.
address=/.test/127.0.0.1
port=53
# always 127.0.0.1, referring to the local dnsmasq service
nameserver 127.0.0.1
Starting service now and at login from now on:
$ sudo brew services start dnsmasq
$ ping -c 1 myproject.test