0

I'm newbie on backend stuff. I need to deploy a full stack app. I'll deploy frontend to Netlify and backend to Heroku.

I've managed to deploy backend(node.js) on Heroku by terminal. However, it doesn't respond any request from fetch.

That's what I've done so far in my backend folder.

heroku create
git add .
git commit -am "Some commit"
git push heroku

So it worked and I see my backend app in Heroku. However, when I open the app,only thing I see is default 'welcome to your app' page of Heroku.

I've tried to fetch by Heroku link and all I get is 502 error. I've tested on Postman and response is just markup of default Heroku welcome page.

The error log in my terminal when I try to fetch is as below.

2021-03-04T11:41:52.037366+00:00 heroku[router]: at=info code=H81 desc="Blank app" method=GET path="/search?q=matrix%204" host=salty-meadow-59254.herokuapp.com request_id=3b671893-c701-4319-a93a-8725063a5fd3 fwd="176.33.88.191" dyno= connect= service= status=502 bytes= protocol=https

Thanks in advance for any help

1 Answer 1

1

Before any code has been deployed, Heroku will display a generic welcome message to its visitors. This page is served with HTTP status code 502 to indicate that the app is not yet running.

https://devcenter.heroku.com/articles/creating-apps

Heroku only deploys code that you push to master or main branch.

git push heroku master

https://devcenter.heroku.com/articles/git#deploying-code

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.