title: How to serve a backend server which is local to the angular frontend?
body: <p>I have an angular app running on an apache server at <code>http://localhost</code>.<br>
  I have a backend flask server running on the same machine on port 5200 (<code>http://localhost:5200</code>).  </p>
  
  <p>I can access the backend through the frontend from the server, but when I try from another machine, the front-end obviously refers the client to his own machine which isn't running the backend. </p>
  
  <pre><code>import { Injectable } from '@angular/core';
  import { HttpClient } from '@angular/common/http';
  import { BehaviorSubject, Observable, of } from 'rxjs';
  
  @Injectable()
  export class DataService {    
  
    dataUrl = 'http://localhost:5002/api'
  
    constructor(private http: HttpClient) { }
  
    getData(): Observable&lt;DataItem&gt; {    
      return this.http.get&lt;DataItem&gt;(this.dataUrl)
    }
  }
  </code></pre>
  
  <p>Is there a way for me to do something like this?</p>
  
  <pre><code>dataUrl = 'http://${SameIpAsFrontEnd}:5002/api'
  </code></pre>