process.env.PORT is undefined
问题 I am trying to go to production on one of my node.js applications which runs ion windows server 2012. After a week of troubleshooting and reading everything I could get to online, the problem seems to be the "process.env.PORT" variable. The symptoms are as follows: The website works fine when: set PORT=3510 in console domain.com:3510/index.html in remote browser However, when I type: domain.com I get a 404 - File or directory not found. When I console.log the "process.env" object at startup