title: Call local domain from React Native and expo
body: <p>I have local website, with Wampserver and Windows (<code>C:\Windows\System32\drivers\etc\hosts</code> edited).</p>
  
  <blockquote>
    <p><a href="http://myproject.local" rel="nofollow noreferrer">http://myproject.local</a></p>
  </blockquote>
  
  <p><strong>This site works great from my computer.</strong></p>
  
  <p>Now, I want create mobile application with React Native and Expo.</p>
  
  <p>But, in my mobile app, when I call my website :</p>
  
  <pre><code>export function getForumIndex () {
      const url = 'http://myproject.local/api/test'
  
      return fetch(url)
          .then((response) =&gt; response.json())
          .catch((error) =&gt; console.error(error))
  }
  </code></pre>
  
  <p>I have this error :</p>
  
  <blockquote>
    <p>[21:29:58] JSON Parse error: Unrecognized token '&lt;'
    node_modules\promise\setimmediate\core.js:37:14 in tryCallOne
    node_modules\promise\setimmediate\core.js:123:25 in unknown
    ... 8 more stack frames from framework internals</p>
  </blockquote>
  
  <p>I think my phone and expo can not call the API on my computer (<a href="http://myproject.local/api/test" rel="nofollow noreferrer">http://myproject.local/api/test</a>). I am a beginner in mobile application. When I test with <a href="https://www.themoviedb.org/?language=fr" rel="nofollow noreferrer">TMDb API</a> it works well.</p>
  
  <p>I do not know how to do it, can you help me ? :)</p>