title: MERN app works locally but breaks on Heroku
body: <p>I am trying to deploy <a href="https://github.com/SirIsaacNeutron/writer" rel="nofollow noreferrer">this MERN GitHub project</a> to Heroku. Heroku builds it fine and the site is live <a href="https://writer-w.herokuapp.com/" rel="nofollow noreferrer">here</a>. However, the code on the Heroku site has a whole bunch of problems that don't occur when I run my site locally on my computer.</p>
  <p>I think the problem might be the proxy server I set up (setupProxy.js):</p>
  <pre><code>const { createProxyMiddleware } = require('http-proxy-middleware');
  
  module.exports = function(app) {
    app.use(
      '/api',
      createProxyMiddleware({
        target: 'http://localhost:5000',
        changeOrigin: true,
      })
    );
  };
  </code></pre>
  <p>I can't think of anything else that could be causing all the bugs on Heroku. I would really appreciate any assistance that can be given, since I've been dealing with this issue for some time now (I gave up on fixing it last year but have returned to it) and it's been very frustrating. Thank you for your time.</p>