title: React App giving 404 on main js and css
body: <p>I built a react app using "react-scripts". The application runs perfectly on my local development server but when I deploy to my actual server the applications seems to not find the main JS and CSS files being compiled. I get 404 on both. </p>
  
  <p>Following is the information that might help. 
  The files on the server are located at </p>
  
  <blockquote>
    <p>ads/build/static/js and ads/build/static/css || respectively</p>
  </blockquote>
  
  <p>The 404s I am getting are on the following files: </p>
  
  <blockquote>
    <p><a href="https://www.example.com/ads/build/static/css/main.41938fe2.css" rel="nofollow noreferrer">https://www.example.com/ads/build/static/css/main.41938fe2.css</a>
    <a href="https://www.example.com/ads/build/static/js/main.74995495.js" rel="nofollow noreferrer">https://www.example.com/ads/build/static/js/main.74995495.js</a></p>
  </blockquote>
  
  <p>Here is how my server is configured: </p>
  
  <pre><code>const express = require('express');
  const path = require('path');
  const app = express();
  const favicon = require('serve-favicon');
  
  //favicon
  app.use(favicon(path.join(__dirname, 'public', 'favicon.ico')));
  
  app.get('/ads', function (req, res) {
  app.use(express.static(path.join(__dirname, 'build/static')));
  console.log(path.join(__dirname, 'build'));
  res.sendFile(path.join(__dirname, '/build/index.html'));
  });
  
  app.listen(9000);
  </code></pre>
  
  <p>In my package.json I have also included the homepage parameter as: 
  <code>"homepage" : "https://www.example.com/ads</code></p>
  
  <p><strong>UPDATE</strong>
  When I run the app on the server itself with the following path: 
  <code>dedicated-server-host:9000/static/js/main.74995495.js</code> that renders the JS file correctly</p>
  
  <p>Is there some configuration that I am missing, the routing doesn't seem to be working. Please advise. </p>