I have a NodeJs application deployed on Heroku.
Since I need to execute to different Procfile in production and development I have installed Foreman for Node (https://www.npmjs.com/package/foreman).
After that I created my .env file and .foreman file and my two Procfile: Profile and Procfile.dev
Executing the command to start the server
nf start -f Procfile.dev
Throws the following error:
Error: listen EADDRINUSE Procfile.dev
That's because Foreman by default select the port 5000. So I inserted this code in the .foreman file:
port: 3003
The problem is that option is still ignored and I still receive the EADDRINUSE error. Even executing the command:
nf start -p 3003 -f Procfile.dev
solve anything, the port is still ignored.
On the other site if I execute command without the -f flag, the port option is not ignored.
How can I solve this?