title: Which Url do I have to use if I want to connect a back-end using node.js (mongodb), postman and flutter?
body: <p>I'm using in my backend this url:</p>
  <pre><code>const MONGO_DB_CONFIG = {
      DB: &quot;mongodb://localhost/ecommerce-app&quot;
  }
  </code></pre>
  <p>postman:</p>
  <pre><code>http://localhost:4000/api/products/
  </code></pre>
  <p>from here, everything works, but if I use flutter and tried to connect my backend  it doesn't work.</p>
  <p>In flutter, I got this:</p>
  <pre><code>class Config {
    static const String apiURL = &quot;10.0.2.2:4000&quot;;
  }
  </code></pre>
  <p>but I got this error on terminal:</p>
  <pre><code>Performing hot restart...
  Syncing files to device sdk gphone64 x86 64...
  Restarted application in 2,077ms.
  I/.mongo_database(18019): NativeAlloc concurrent copying GC freed 56675(1921KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 2514KB/5029KB, paused 544us,73us total 273.631ms
  
  ======== Exception caught by image resource service ================================================
  The following SocketException was thrown resolving an image codec:
  Connection refused (OS Error: Connection refused, errno = 111), address = localhost, port = 38912
  </code></pre>
  <p>How to solve this issue?</p>