Skip to content

Instantly share code, notes, and snippets.

@mauricerenck
Last active February 20, 2019 12:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mauricerenck/e803158122b9d1730a34a2280f1a6bd0 to your computer and use it in GitHub Desktop.
Save mauricerenck/e803158122b9d1730a34a2280f1a6bd0 to your computer and use it in GitHub Desktop.
make .test domains available without /etc/hosts

setting up .test TLD for local development

  1. Install dnsmasq: brew install dnsmasq
  2. cd $(brew --prefix); mkdir etc; echo 'address=/.test/127.0.0.1' > etc/dnsmasq.conf
  3. sudo cp -v $(brew --prefix dnsmasq)/homebrew.mxcl.dnsmasq.plist /Library/LaunchDaemons
  4. sudo launchctl load -w /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist
  5. sudo mkdir /etc/resolver
  6. sudo bash -c 'echo "nameserver 127.0.0.1" > /etc/resolver/test'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment