muonlab » Development

random .NET and web development musings

I simultaneously work on multiple web projects, and have a back catalogue of scores of sites that could need my attention at any time.

I always run my sites locally in a fully fledged IIS site (rather than using Cassini) which means each site needs its own hostname.

Until recently I had been managing this with my hosts file, simply adding a new line:

127.0.0.1  mysite.dev

for each site. However last week I reached breaking point as my hosts file was about 3 pages long.

Enter Velvet. Velvet adds wildcard support to your hosts file by acting as a simple DNS server that you can run stand alone or (preferably) as a windows service.

I have now reduced 3 pages of hosts entries into a two lines:

127.0.0.1  *.dev
127.0.0.1  *.*.dev

actually theres a few others, such as wildcard mappings to my colleagues machines:

192.168.0.2  *.jim
192.168.0.2  *.*.jim
192.168.0.3  *.bob
192.168.0.3  *.*.bob

This means I now rarely ever need to touch my hosts file, at least not for standard day-to-day project work :)

Ultra time saving win.

Check out the project on github.

Feature suggestions welcome!