Reputation: 1
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 :
and the app.js file's get and post rout below :
I added the rpm config vars, env variables but nothing is working
Upvotes: 0
Views: 25
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