Abhinav Srivastava
Abhinav Srivastava

Reputation: 1

Heroku errors Node

I am new to Heroku and I wanted to deploy my simple NodeJs app to Heroku but I am constantly getting errors.Everything in the screenshot below : Heroku logs and the app.js file's get and post rout below : enter image description herepost route

I added the rpm config vars, env variables but nothing is working

Upvotes: 0

Views: 25

Answers (1)

Chris
Chris

Reputation: 137099

Pretty much everywhere other than on Windows, process.env.port is different from process.env.PORT.

Use the uppercase version:

process.env.port
// => undefined
process.env.PORT
// => '12345'

Of course, I made 12345 up. Heroku will give you an arbitrary value that changes frequently.

Upvotes: 1

Related Questions