
"When working on a single web project, running flask run on a fixed port is usually more than sufficient. However, as soon as you start developing multiple services in parallel, this approach quickly becomes cumbersome: ports collide, you have to remember which service runs on which port, and you end up constantly starting, stopping, and restarting individual development servers by hand."
"Edit the configuration file: sudovim/opt/homebrew/etc/dnsmasq.conf Add the following: # Listen only on localhost listen-address=127.0.0.1 bind-interfaces # DNS port port=53 # Wildcard domain for local development address=/.lan/127.0.0.1 This maps any *.lan hostname to 127.0.0.1. It's recommended to not use .dev as this is real Google owned TLD and browsers have baked in to use HTTPS only. Also don't use.local as this is reserved for mDNS (Bonjour)."
"This is a concise summary of how to install and configure dnsmasq on macOS Sonoma to resolve local development domains using a .lan wildcard (e.g.*.lan 12.0.0.1). macOS ignores /etc/resolv.conf, so DNS must be configured per network interface. Option A: System Settings (GUI) System Settings 14 Network Select your active interface (Wi-Fi / Ethernet) Details 14 DNS Add: Move it to the top of the DNS server list Option B: Command line networksetup-setdnsserversWi-Fi127.0.0.1 (Replace Wi-Fi with the correct interface name if needed.)"
Install dnsmasq via Homebrew; the default config lives at /opt/homebrew/etc/dnsmasq.conf on Apple Silicon. Configure dnsmasq to listen on 127.0.0.1, bind interfaces, set port 53, and map address=/.lan/127.0.0.1 so any *.lan resolves to localhost. Avoid using .dev (owned by Google with forced HTTPS) and .local (reserved for mDNS/Bonjour). Configure macOS to use dnsmasq by adding 127.0.0.1 as the top DNS server for the active network interface via System Settings → Network or via the networksetup command. Start dnsmasq as a background service to enable wildcard local domain resolution for development.
Read at Peter-hoffmann
Unable to calculate read time
Collection
[
|
...
]