Question: I am learning GraphQL using with React, but stuck at routing issue.
This is mostly from the express, App works fine on the home route "localhost:4000/", but other then this "localhost:4000/song" , I get 'Cannot GET /song' error.

Here's full code: [Lyrical-GraphQL Demo](https://github.com/Digant312/Lyrical-GraphQL)

Here's my server.js file:

```
const express = require('express');
const models = require('./models');
const expressGraphQL = require('express-graphql');
const mongoose = require('mongoose');
const bodyParser = require('body-parser');
const schema = require('./schema/schema');

const app = express();

// Replace with your mongoLab URI
const MONGO_URI = 'mongodb://XXX:XXX@ds123371.mlab.com:23371/lyricaldb';
if (!MONGO_URI) {
    throw new Error('You must provide a MongoLab URI');
}

mongoose.Promise = global.Promise;
mongoose.connect(MONGO_URI);
mongoose.connection
    .once('open', () => console.log('Connected to MongoLab instance.'))
    .on('error', error => console.log('Error connecting to MongoLab:', error));

app.use(bodyParser.json());
app.use('/graphql', expressGraphQL({
    schema,
    graphiql: true
}));

const webpackMiddleware = require('webpack-dev-middleware');
const webpack = require('webpack');
const webpackConfig = require('../webpack.config.js');
app.use(webpackMiddleware(webpack(webpackConfig)));

module.exports = app;

```

Answer: 
You need to define routes and respective component to render. This can be of help,

<https://gist.github.com/siakaramalegos/df4620c52e829f6107c75d5c3f0ad7f5>
That's because the request is going to the server. The error you're seeing is from express server.

You'll need to add a handler in `server.js` to capture all other requests something like this 

```js
app.get('*', function(req, res) {
  res.sendfile('path-to-your-index-html');
});

```

Infact, I think this [post](https://github.com/ReactTraining/react-router/issues/1047) might be useful.