title: my app have a problem after i refresh the page
body: <p>when i open my app for the first time it work just fine but when i refresh the page it give me a url to my index.html file ( /client/build/index.html ) , i have deploy it on heroku </p>
  
  <p>that is the code in my app.js file that create the server</p>
  
  <pre><code>const express = require('express');
  const app = express();
  const path = require('path');
  
  // create a server for socket io
  
      const http = require('http');
      const socketio = require('socket.io');
      const server = http.createServer(app);
      module.exports = io = socketio(server);
  
      // my middle ware
      const morgan = require('morgan');
      const bodyParser = require('body-parser');
  
      // Init Middelware
      app.use(express.json({ extended: false }));
  
      // my router
      const postRoute = require('./nodeapi/routers/post');
      const authRouter = require('./nodeapi/routers/auth');
      const usersRouter = require('./nodeapi/routers/users');
      const friendRouter = require('./nodeapi/routers/friend');
      const chatRouter = require('./nodeapi/routers/chats');
      const mongoDB = require('./nodeapi/mongodb-database/db');
      const port = process.env.PORT;
  
      // Connect monogo database
      mongoDB();
  
      // Middel ware
      app.use(morgan('dev'));
      app.use(bodyParser.json());
  
      // Get the routes
      app.use('/', postRoute);
      app.use('/', authRouter);
      app.use('/', usersRouter);
      app.use('/', friendRouter);
      app.use('/', chatRouter);
      app.use('/file/', express.static('./uploads/'));
  
      // connect to socket io
      io.on('connection', (socket) =&gt; {});
      //Serve static assets in productio
      if (process.env.NODE_ENV === 'production') {
        // Set static folder
        app.use(express.static('./client/build'));
        app.get('*', (req, res) =&gt; {
          res.send(path.resolve(__dirname, '..', 'client', 'build', 'index.html'));
        });
      }
      // listen to the port
      server.listen(port, () =&gt; {
        console.log(`this is port ${port}`);
      });
  </code></pre>
  
  <p>this is when i open it for the first time 
  <a href="https://i.stack.imgur.com/sQcGP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sQcGP.png" alt="enter image description here"></a></p>
  
  <p>this is when i refresh the page
  <a href="https://i.stack.imgur.com/TNiQy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TNiQy.png" alt="enter image description here"></a></p>