title: App failing to work after deployment via Heroku
body: <p>I'm trying to deploy my app to Heroku in which I believe is working. Whilst testing my app via localhost it works fine, everything is posting. However after deployment and replacing all my URLs to Heroku, number of things are not working:</p>
  <ol>
  <li>The GIPHY API no longer works</li>
  <li>Nothing would post (comments and likes work but not the posting)</li>
  </ol>
  <p>I have tried debugging however nothing has worked. Where am I going wrong? Please see below for details</p>
  <p>app: <a href="https://mitnickproject1-journal-app.netlify.app/" rel="nofollow noreferrer">https://mitnickproject1-journal-app.netlify.app/</a>
  heroku: <a href="https://journal-post-pl.herokuapp.com/print" rel="nofollow noreferrer">https://journal-post-pl.herokuapp.com/print</a></p>
  <p>Front-end code</p>
  <pre><code>const formEl = document.querySelector('form');
  formEl.addEventListener('submit', postFormData)
  let count=0;
  
  async function postFormData(e) {
    const current= new Date().toLocaleString() 
    const formData= new FormData(formEl) // console.log this to check what format this is in 
    const formDataSerialised=Object.fromEntries(formData) //console.log this to see what this does
    const jsonObject = {...formDataSerialised, &quot;dateTime&quot;: current, &quot;comment&quot;: [], &quot;EmojiCount&quot;: [0,0,0], &quot;gifLink&quot;:gifLink, 'id': count}
    console.log(JSON.stringify(jsonObject, null, 2))
    try{
      const options = { method: 'POST', 
      body: JSON.stringify(jsonObject),
      headers: {
        'Content-Type': 'application/json'
      }
    }
  
    await fetch(&quot;https://journal-post-pl.herokuapp.com/test&quot;, options);
      // const response = await fetch(&quot;https://journal-post-pl.herokuapp.com/test&quot;, {
  
      // })
      // const json = await response.json();
    }catch(err){
      console.error(err);
      alert('There was an error')
    }
  }
  </code></pre>
  <p>Back End Code</p>
  <pre><code>app.post('/test', (req, res) =&gt; {
      formData.push(req.body)
      console.log(formData)
      writeToJson();
      res.json({success: true})
  })
  </code></pre>
  <p>Any help would be appreciated</p>