1

I am attempted to deploy an application on Heroku, but cannot figure out why it will run locally yet not on Heroku. I was hoping this is something simple I am not seeing, being new to Heroku. Could use any help!

Here is the GitHub Repo: https://github.com/jacklemasters/tech-blog

Here is the Heroku page: https://techblog-lemasters.herokuapp.com/

and here are the errors I am running into: https://www.dropbox.com/scl/fi/gwklh9hj9zbdpq3ql2yob/_Heroku-Logs.paper?dl=0&rlkey=w0v9dmvvj4f26fiecp9hxymmd

3
  • That log output is impossible to read. Please edit your post and re-paste that from your log output. Then select it again and click the {} button to format it as code. There's also a good chance that we'll need to see more of it. Commented Oct 5, 2021 at 1:00
  • Sorry about that. Added a dropbox link with the full list of errors after running 'heroku logs -t' Commented Oct 5, 2021 at 1:31
  • We're not going to download a file from Dropbox, or go off-site just to read your log. Please read How to Ask. Questions must be self-contained. Again, please paste the error message into your question and then format it as code. Commented Oct 5, 2021 at 1:32

2 Answers 2

1

I think you have some problems with process.env when deploying to Heroku)

Just try to put raw value instead of usage process.env and I guess all be ok. If it's true It means a problem with reading .env

in this field https://github.com/jacklemasters/tech-blog/blob/74176ec84a90ab2dd71b62f7af4e1419350b80db/config/connection.js#L10

I hope it helps! Enjoy programming!

One piece of advice, don't store credentials in public the git repo🙂

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

Comments

0

Your connection to the database is failing. Can you try double-checking your database connection parameters?

By the way, you've committed a .env file with credentials in it. You should immediately update your database credentials and refrain from committing them in the future.

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.