title: Assigning a domain name to localhost for development environment
body: <p>I am building a website and would not like to reconfigure the website from pointing to <code>http://127.0.0.1</code> to <code>http://www.example.com</code>. Furthermore, the certificate that I am using is of course made with the proper domain name of <code>www.example.com</code> but my test environment makes calls to <code>127.0.0.1</code> which makes the security not work properly.</p>
  
  <p>What I currently want to do is configure my development environment to assign the domain name <code>www.example.com</code> to <code>127.0.0.1</code> so that all <code>http://www.example.com/xyz</code> is routed to <code>http://127.0.0.1:8000/xyz</code> and <code>https://www.example.com/xyz</code> is routed to <code>https://127.0.0.1:8080/xyz</code>.</p>
  
  <p>I am <em>not</em> using Apache. I am currently using node.js as my web server and my development environment is in Mac OS X Lion.</p>