Sunday 29 March 2020

Deploying to Heroku but receiving errors.

Currently I am facing two errors:Image not being found. My website loads but the icon image is missing. I have it in a public file in my project directory. The error is GET https://messageiab.herokuapp.com/icon.svg 404 (Not Found). In my html file I have this tag: My fetch request is not working. The error is packageHandler.js:24 POST https://localhost:3000/ 503 (Service Unavailable) :​fetch('http://localhost:3000/', {method: 'POST', header: { 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' }, body: encodedData}) .then((response) => { message.style.opacity = "100%"; message.style.width = "100%"; message.style.height = "100%"; icon.style.width = "0%"; icon.style.paddingTop = "0%"; loadingMessage.style.opacity = "0%" message.style.pointerEvents = "auto"; return response.json(); }) .then((data) => { document.getElementById("senderName").innerHTML = data.name; document.getElementById("response").innerHTML = data.message; }); Now I get that I have to change the fetch request from the local host but when I switch it to my domain https://messageiab.herokuapp.com/ it still returns an error.

Submitted March 29, 2020 at 05:58PM by TheSlothJesus

No comments:

Post a Comment