title: How to serve production react bundle.js built by webpack?
body: <p>My app works fine in webpack development server. Now, I want to deploy it to my production server. So I built bundle.js. I tried serving the file on express server, but I can't access urls other than the root <code>/</code>.</p>
  <p>For example, here is my react routes:</p>
  <pre><code>var Routes = () =&gt; (
      &lt;Router history={browserHistory}&gt;
          &lt;Route path=&quot;/&quot; component={Landing}&gt;
          &lt;/Route&gt;
          &lt;Route path=&quot;/app&quot; component={App}&gt;
          &lt;/Route&gt;
      &lt;/Router&gt;
  )
  </code></pre>
  <p>and express app (I put <code>bundle.js</code> and <code>index.html</code> in <code>./public</code>):</p>
  <pre><code>app.use(express.static('./public'));
  app.listen(port, function () {
      console.log('Server running on port ' + port);
  });
  </code></pre>
  <p>Landing page http://localhost:3000/ works. But the app http://localhost:3000/app doesn't. Instead, I got an error <code>Cannot GET /app</code>.</p>