Error while deploying Node Express app in Heroku - node.js

I've been trying to deploy a node-express app in Heroku. I've created the app in Heroku, and try to open the app link which created at the end of the deployment. But it showing application error.
screenshot of the error I got while running the app address
I think the error should be in the main route code.
Error status when I ran the Heroku logs --tail.
Anyone gone through this earlier, help me to figure it out and resolve this issue.
Thanks in advance.

Related

Node.js app showing favicon.ico path error

I have deployed a Node.js app to heroku but as I run it for first time, it works good but then some error logs come up which say npm error and favicon.ico error and then the server closes the connection. I am not getting any sort of help from their documentation. Please help me run it!!

Getting error 503 after deploying node backend on heroku. Anyone know why this could be?

After
I am getting this error after deploying the app... Anyone know why this could be happening?
This is what I am getting in the console:
Failed to load resource: the server responded with a status of 503 (Service Unavailable)
This is the heroku logs
Thanks to the suggestion from Janith to check Heroku logs, I figured out the issue!
I previously set the routes on an app.js file when it needed to be pointing to my index.js file. Also, I needed to set nodemailer on a different file. After setting the routes in my index.js file and setting nodemailer on a separate file the issue was fixed.
Hope this helps anyone running to the same silly issue!
Thanks again #janith!

How to check errors log on heroku? (nodejs app)

Where can I check what error my nodejs app is producing?
I dont have that error on my local machine, and heroku web worker only returns to browser:
"Internal Server Error"
How can I find out what is this error about?
You can run heroku logs command or use add-ons like Papertrail to manage your logs.
If you error has an error code you can find more info about it in Heroku Error Codes

Heroku - Node.js application deployed successfully, heroku local fails

I have a MEAN stack app which has been successfully deployed to heroku. Everything works great using the heroku hosted version of my application.
For some reason, when I run my app using "heroku local" it fires up and appears to be working correctly but I can't access any of my endpoints.
Postman gives me the following error instantly "Could not get any response". I am also at a loss for where to even begin troubleshooting this problem, even running the application using "node app.js" gives me the same error. This did not happen prior to deploying to heroku!
Some files I have added are 'Procfile'
web: node app.js
Am I missing something here?
Another thing I have added is the MongoLab addon, to isolate and see if this was the issue I created a test endpoint at "http://localhost:8080/api/test" but it doesnt even respond with the simple "message: 'Success!'" json response.

Heroku deploy notworking

I am having problems with my initial app deployment on Heroku. I've been through both the info in the dev center and Getting Started with Node.js on Heroku. While typing 'heroku open' within the dist directory I get a page that pops up in my browser with the message: Heroku | Welcome to your new app Refer to the documentation if you need help deploying.
Why isn't my site popping up?

Resources