title: Replace localhost in heroku
body: <p>Going to deploy an application on heroku. I have got requests from react-axios that calls to <code>localhost</code>. Now I know that when I deploy it to a server, <code>localhost</code> refers to server address.</p>
  <p>So how do I change these <code>localhost</code> to IP assigned by Heroku.</p>
  <p>Here is an example of axios call from react</p>
  <pre><code>axios.get(&quot;http://localhost:5000/getMessages&quot;).then((response) =&gt; {
        this.setState({ res: response.data });
  }
  </code></pre>