Skip to content

Instantly share code, notes, and snippets.

@derekaug
Last active August 30, 2023 19:46
Show Gist options
  • Save derekaug/ff29767ed18ad52d3ec0434c6eedc5ae to your computer and use it in GitHub Desktop.
Save derekaug/ff29767ed18ad52d3ec0434c6eedc5ae to your computer and use it in GitHub Desktop.
DNSMasq Setup for Local Development
brew install dnsmasq
mkdir -pv $(brew --prefix)/etc/
echo "# LOCAL DEVELOPMENT HOSTS" >> $(brew --prefix)/etc/dnsmasq.conf
echo 'address=/.localhost/127.0.0.1' >> $(brew --prefix)/etc/dnsmasq.conf
echo "address=/.localhost/::1" >> $(brew --prefix)/etc/dnsmasq.conf
sudo mkdir -v /etc/resolver
sudo bash -c 'echo "nameserver 127.0.0.1" > /etc/resolver/localhost'
sudo brew services start dnsmasq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment