title: How to change localhost name for angular 4 in dev env for ssl testing?
body: <p>I am trying to change my hosting env instead of <code>localhost/</code> to something like www.example.com. I tried to change the the conf in my hosts file (<code>sudo nano /private/etc/hosts</code>) and doing something like below and clear my DNS cache <code>dscacheutil -flushcache</code> but did not work. am I missing something?</p>
  
  <pre><code>##
  # Host Database
  #
  # localhost is used to configure the loopback interface
  # when the system is booting.  Do not change this entry.
  ##
  127.0.0.1       localhost
  127.0.0.1       www.example.com
  255.255.255.255 broadcasthost
  ::1             localhost
  10.211.55.4     window10pro
  127.0.0.1       AcronisDriveSearchPlugin
  </code></pre>
  
  <p>Note, I am using proxy config to redirect the url calls,</p>
  
  <pre><code>{
    "/api": {
       "target": "https://localhost:5001",
       "secure": false
    }
  }
  </code></pre>
  
  <p>and I my script start in <code>package.json</code></p>
  
  <pre><code>"scripts": {
      "ng": "ng",
      "start": "ng serve --ssl --proxy-config proxy.config.json",....
  </code></pre>
  
  <p>I call <code>npm start</code> to serve my project</p>