title: static.json not working for ReactJS routes and Heroku
body: <p>In theory this should work, adding at the <code>/</code> folder the file <code>/static.json</code> that makes everything go to the React <code>index.html</code>.</p>
  
  <p>(related)</p>
  
  <p><a href="https://stackoverflow.com/questions/41772411/react-routing-works-in-local-machine-but-not-heroku">React Routing works in local machine but not Heroku</a></p>
  
  <p><a href="https://github.com/heroku/heroku-buildpack-static#configuration" rel="nofollow noreferrer">https://github.com/heroku/heroku-buildpack-static#configuration</a></p>
  
  <p>In my case it doesn't work, I get a <code>Cannot GET /hello</code> instead of receiving the index.html. Surprisingly, if I go directly to <code>/index.html</code> I get the page but no route is activated.</p>
  
  <p><strong>What is happening and how can I fix it?</strong></p>
  
  <blockquote>
    <p>UPDATE: tried without luck <code>/static.jason</code> <code>/src/static.jason</code> <code>/client/static.jason</code> <code>/client/src/static.jason</code></p>
  </blockquote>
  
  <p><code>/static.json</code></p>
  
  <pre><code>{
    "routes": {
      "/**": "index.html"
    }
  }
  </code></pre>
  
  <p><code>/client/src/index.js</code></p>
  
  <pre><code>import React from 'react';
  import ReactDOM from 'react-dom';
  import FileUpload from './FileUpload';
  
  ReactDOM.render(
    &lt;div&gt;&lt;FileUpload /&gt;&lt;/div&gt;,
    document.getElementById('root')
  );
  </code></pre>
  
  <p><code>/client/src/FileUpload.mjs</code></p>
  
  <pre><code>import React, { Component } from 'react';
  import { BrowserRouter as Router, Route } from 'react-router-dom';
  
  class TextFileReader extends Component {
   render() {
    return (
     &lt;Router&gt;
      &lt;div&gt;
       &lt;Route path="/heyyo" render={() =&gt; &lt;span&gt;heyyo&lt;/span&gt;} /&gt;
       &lt;Route exact path="/" render={() =&gt; &lt;div&gt;resting&lt;/div&gt;} /&gt;
       &lt;Route path="/what" render={() =&gt; &lt;div&gt;what&lt;/div&gt;} /&gt;
        NO ROUTES HERE
      &lt;/div&gt;
     &lt;/Router&gt;
    )
   }
  }
  
  export default TextFileReader;
  </code></pre>