title: Get image from localhost to localhost with express and nodejs
body: <p>I´m building an app with NodeJs and Angular</p>
  
  <p>The server runs on <a href="http://localhost:9000" rel="nofollow noreferrer">http://localhost:9000</a></p>
  
  <p>And the app runs on <a href="http://localhost:4200" rel="nofollow noreferrer">http://localhost:4200</a></p>
  
  <p>I have an endpoint whose looks like this <a href="http://localhost:9000/users" rel="nofollow noreferrer">http://localhost:9000/users</a>
  I use this to retrive all users</p>
  
  <p>The set returned has a key like this <code>{ photo: myphoto.jpg }</code></p>
  
  <p>When I loop the set of data, I want to render the image as this way</p>
  
  <pre><code>  &lt;img src="{{ url }}/uploads/users/{{ user.photo }}" alt="{{ user.name }} {{ user.last_name }}"
      class="img-fluid shadow-sm avatar100 ml-auto mr-auto d-block rounded-circle"&gt;
  </code></pre>
  
  <p>Where <code>url</code> is <a href="http://localhost:9000" rel="nofollow noreferrer">http://localhost:9000</a> and user.photo is <code>myphoto.jpg</code></p>
  
  <p>The complete route is <code>http://localhost:9000/uploads/users/myfoto.jpg</code>
  There is the photo hosted, but the server is throwing an error</p>
  
  <blockquote>
    <p>Cannot GET /uploads/users/myfoto.jpg</p>
  </blockquote>
  
  <p>I think, the server is interpreting the URL as API route, and obviously is not declared on routes file.</p>
  
  <p>I want to only retrive the image, how could I do that?</p>
  
  <p>I don´t know what part of my code I can show here. Routes? Front-end? Project structure? Tell me what do you need</p>