title: why is my html root blank when using react-router into express locally
body: <p>I am trying to get two routes working at the moment '/' and 'login' atm just using the same page. However, when I load the page through express and not webpack-dev-sever, I get a blank html page instead of the react-router loading. Not sure where to go from here.</p>
  
  <p>I've seen examples I believe for express to just route directly to the html page, which I do here, I get no errors just a blank html, with 'root' id that it connects the react to.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>folder
  ├── server.js
  ├── index.js(for final react render)
  ├── Src
  │   ├── public
  │   │   ├── index.js(empty html for react)
  │   │   
  │   │__ components
  │   │   
  │   │__routes   
  │   │  |__index.js(react-routes)
      |
      |__index.js(gathers all components to push to index.js next directory up)</code></pre>
  </div>
  </div>
  </p>
  
  <p><strong>Server.js</strong></p>
  
  <pre><code>const express = require('express');
  const path = require('path');
  
  const app = express();
  const PORT = process.env.PORT || 3000;
  
  
  app.get('/**', (req, res) =&gt; {
    res.sendFile(path.join(__dirname, '/src/public/index.html'));
  });
  
  app.listen(PORT, () =&gt; {
    console.log('server has started at:' + PORT);
  });
  </code></pre>
  
  <p><strong>Package.json</strong></p>
  
  <pre><code>{
    "name": "chauffeurus",
    "version": "1.0.0",
    "description": "new repo of previous group project similar to uber website",
    "main": "./index.js",
    "scripts": {
      "test": "echo \"Error: no test specified\" &amp;&amp; exit 1",
      "dev": "webpack-dev-server",
      "postinstall": "webpack -p",
      "start": "node server.js"
    },
    "keywords": [
      "reactjs",
      "javascript",
      "webpack",
      "mongoose",
      "mongodb"
    ],
    "author": "christian a.",
    "license": "ISC",
    "devDependencies": {
      "webpack-dev-server": "^1.16.2"
    },
    "dependencies": {
      "babel-core": "^6.21.0",
      "babel-loader": "^6.2.10",
      "babel-preset-latest": "^6.18.0",
      "babel-preset-react": "^6.16.0",
      "bcrypt-nodejs": "0.0.3",
      "file-loader": "^1.1.5",
      "html-webpack-plugin": "^2.26.0",
      "mongoose": "^4.13.2",
      "passport": "^0.4.0",
      "react": "^15.4.1",
      "react-bootstrap": "^0.31.5",
      "react-dom": "^15.4.1",
      "react-redux": "^5.0.6",
      "react-router": "^4.2.0",
      "react-router-dom": "^4.2.2",
      "react-router-redux": "^4.0.8",
      "redux": "^3.7.2",
      "webpack": "^1.14.0"
    }
  }
  </code></pre>
  
  <p><strong>Routes index.js</strong></p>
  
  <pre><code>import React from 'react'
  import { Homepage } from '../index.js';
  import { BrowserRouter, Route } from 'react-router-dom';
  
  export default () =&gt; (
    &lt;BrowserRouter&gt;
      &lt;div&gt;
        &lt;Route path="/" exact component={Homepage} /&gt;
        &lt;Route path="/login" exact component={Homepage} /&gt;
      &lt;/div&gt;
    &lt;/BrowserRouter&gt;
  )
  </code></pre>
  
  <p><strong>index.js outside of src folder</strong></p>
  
  <pre><code>import React from 'react'
  import ReactDOM from 'react-dom';
  import { Homepage } from './src/index.js';
  import Routes from './src/index.js';
  
  ReactDOM.render(&lt;Routes /&gt;, document.getElementById('root'));
  </code></pre>
  
  <p><strong>Webpack.config.js</strong>
  <div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const path = require('path');
  
  //NPM Install that "tells the plugin to add any JavaScript into the bootom of the page...
  // just before the closing body tag"
  const HtmlWebpackPlugin = require('html-webpack-plugin');
  const HtmlWebpackPluginConfig = new HtmlWebpackPlugin({
    template: './src/public/index.html',
    filename: 'index.html',
    inject: 'body'
  })
  
  module.exports = {
    entry: './index.js',
    output: {
      path:  __dirname + './dist',
      filename: 'bundle.js'
    },
    module: {
      loaders: [
        { test: /\.js$/, loader: 'babel-loader', exclude: /node_modules/ },
        { test: /\.jsx?$/, loader: 'babel-loader', exclude: /node_modules/ },
        { test: /\.(png|jpg|gif)$/, loader: 'file-loader' }
      ]
    },
    plugins: [HtmlWebpackPluginConfig]
  }</code></pre>
  </div>
  </div>
  </p>