title: Environment specific service endpoint in angular2 with angular-cli
body: <p>I am uning angular-cli for my angular2 project.</p>
  
  <p>I am calling backend ajax services through my angular2 service.</p>
  
  <p>I have different services end point (URL) for different task.
  I want to make those services environment sensetive.</p>
  
  <p>Suppose I have two service</p>
  
  <ol>
  <li>Customer Service : <code>https://localhost:8080/customers</code></li>
  <li>Product Service : <code>https://localhost:8080/products</code></li>
  </ol>
  
  <p>Since <code>localhost</code> is avaliable in my development environment. It is working</p>
  
  <p>Now suppose <code>x.x.x.x</code> is my production web service host ip address.</p>
  
  <p>So for production environment the service URL will be <a href="https://x.x.x.x:8080/customers" rel="nofollow noreferrer">https://x.x.x.x:8080/customers</a></p>
  
  <p>Please help me how to achive this.</p>
  
  <p>I found there is a block in angular-cli.json file as</p>
  
  <pre><code>"environments": {
      "source": "environments/environment.ts",
      "dev": "environments/environment.ts",
      "prod": "environments/environment.prod.ts"
  }
  </code></pre>
  
  <p>But I did now found that environments directory.</p>
  
  <p>How to create that and manage environment specific end points? </p>