3

For an Express App, I need to temporarily change PORT for my App:

var port = process.env.PORT || 8080;

app.listen(port)

I have already read the following StackOverflow question but it is not working for me:

How to change value of process.env.PORT in node.js?

OS: Ubuntu 14.04

Sébastien
  • 11,860
  • 11
  • 58
  • 78
Aquib Vadsaria
  • 350
  • 4
  • 9
  • Something like `PORT=8081 node app.js` or just `export PORT=8081` It's usual shell environment – vp_arth Nov 27 '15 at 06:33
  • Thanks vp_arth, I was able to figure out my problem , something in my environment was already listening to my tested port no. – Aquib Vadsaria Dec 10 '15 at 05:37

0 Answers0