-
Notifications
You must be signed in to change notification settings - Fork 227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: set default port for heroku:local to 5006 #2618
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Request to add some comments, otherwise
3a64eb4
to
beb4f3c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
A couple of members of the community gave feedback (me included) that a default port change probably warrants a major version bump, just chiming in to say it's a shame that this was a minor bump again. Please can listening port number changes be a major bump in future? It makes it much easier to sit up and take note when you're upgrading the CLI. <3 you, Heroku! |
I've just updated the default port listed on https://devcenter.heroku.com/articles/heroku-local from |
work item
This is a fix for #2515 that also does not re-introduce the defect found in #2457.
The approach to this fix is a bit unorthodox, so I am adding some notes here. It is not intended to be long-lived.
The Node Foreman package, which is the basis for our
heroku:local
commands, sets the default port to 5000. However, Apple decided to use that port for AirPlay, which led to two PRs (#2261 and #2475) that set the default port for the local commands to 5001 using oclif defaults. However, this caused the current bug (#2515). Setting the oclif default overrode any .env files being read through Node Foreman.Additionally complicating this matter, Node Foreman has not been maintained in several years. An issue was filed about this default port problem, but we have no confidence that it will be resolved.
We plan in the near future to remove our dependence on Node Foreman. In order to fix this problem in the short-term, however, we have copied over the
nf.js
file from Node Foreman to our own repo and updated the default port to 5006. We are using 5006 instead of 5001 because it is not known to be used by other common software at this time.Testing
yarn install
andyarn build
/packages/cli
directory.env
file that containsPORT=3000
./bin/dev local
PORT=3000
in the .env file inside/packages/cli
./bin/dev local