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>
I solved the problem, actually the issue was not from the server side routing, it was confussion between HashRouter and BrowserRouter of react-router.

Currently I'm using HashRouter and it is working fine. For BrowserRouter, you need to set up all routes prooperly from the server side.

Thanks Community!