title: React application not loading up after Heroku deployment
body: <p>So I have created a MERN stack application which works fine locally. After deploying to Heroku, the React page does not load up.</p>
  <p>The &quot;heroku logs&quot; gives me an error:</p>
  <pre><code>2020-08-01T07:18:59.922864+00:00 heroku[web.1]: Stopping all processes with SIGTERM
  2020-08-01T07:19:00.006437+00:00 heroku[web.1]: Process exited with status 143
  </code></pre>
  <p>The process would then try spinning up my application again and it gives me the previous error and this error:</p>
  <pre><code>2020-08-01T07:20:20.368320+00:00 heroku[router]: at=error code=H20 desc=&quot;App boot timeout&quot; method=GET path=&quot;/&quot; host=andy-keeper-app.herokuapp.com request_id=138cb3bc-3b1f-4443-88ff-f4348003cfc5 fwd=&quot;8.3.88.41&quot; dyno= connect= service= status=503 bytes= protocol=https
  </code></pre>
  <p><em>It seems like the second error has a problem with my DB, I am more interested in how to get the React page to show up</em></p>
  <p>I have research the first problem, and it seems to be a problem with a free dyno. However users asking about this issue seem to get it after their application in idling after 30 minutes. My application does not boot up at all.</p>
  <p>Is there any way to view more error logs in order to find my problem? Or has anyone had a similar experience.</p>
  <p>Here is my server.js file, any other files you need please ask and I'll update it right away</p>
  <p>Server.jS</p>
  <pre><code>require(&quot;dotenv&quot;).config();
  
  const app = express();
  const PORT = process.env.PORT || 5000;
  
  app.use(cors());
  app.use(bodyParser.urlencoded({ extended: false }));
  app.use(bodyParser.json());
  
  // Been defined in .env and Heroku Config Logs
  const url = process.env.ATLAS_URL;
  
  app.use(express.static(path.join(__dirname, &quot;client&quot;, &quot;public&quot;)));
  
  mongoose.connect(url, {
    useNewUrlParser: true,
    useCreateIndex: true,
    useUnifiedTopology: true,
    useFindAndModify: false,
  });
  
  const connection = mongoose.connection;
  connection.once(&quot;open&quot;, () =&gt; {
    console.log(&quot;MongoDB database connection established successfully&quot;);
  });
  
  // Routes
  const userRouter = require(&quot;./routes/user&quot;);
  
  app.use(&quot;/user&quot;, userRouter);
  
  if (process.env.NODE_ENV === &quot;production&quot;) {
    console.log(&quot;Running in production mode&quot;);
    app.use(express.static(path.join(&quot;client&quot;, &quot;public&quot;)));
    app.get(&quot;*&quot;, (req, res) =&gt; {
      res.sendFile(path.join(__dirname + &quot;/client/public/index.html&quot;));
    });
  } else {
    console.log(&quot;Running in development mode&quot;);
  }
  
  app.listen(PORT, () =&gt; {
    console.log(&quot;Server is running on port: &quot; + PORT);
  });
  </code></pre>
  <p>Here is my package.json file for the server-side</p>
  <pre><code>{
    &quot;main&quot;: &quot;index.js&quot;,
    &quot;scripts&quot;: {
      &quot;start&quot;: &quot;node server.js&quot;,
      &quot;heroku-postbuild&quot;: &quot;cd client &amp;&amp; npm install &amp;&amp; npm install &amp;&amp; npm run build&quot;
    },
    &quot;engines&quot;: {
      &quot;node&quot;: &quot;12.18.0&quot;
    }
  }
  </code></pre>
  <p>Thank you!</p>