-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[ENHANCEMENT] automatically select a port by default with ember serve
#10394
Conversation
ember serve
ember serve
return command.validateAndRun().then(function () { | ||
let captor = td.matchers.captor(); | ||
td.verify(tasks.Serve.prototype.run(captor.capture()), {times: 1}); | ||
expect(captor.value.port).to.be.within(4201, 65535, 'has correct port'); |
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.
oo nice!
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.
Thanks a ton for working on this! this is a massive DX win!
I'll also make a patch to fix the test and lint errors |
@sportshead this is looking good -- can you get the tests passing? <3 |
@NullVoxPopuli - all the failed tests are referring to |
the help output shows the description for the flags, so since the |
Fixes #9512 The base port has also been changed from 7020 (which seems to have been arbitrarily chosen in 43878e2) to 4200, the current default. The old value of 7020 also doesn't seem to do anything since it's overridden by the default 4200 anyways. The `should throw error when -p PORT is taken` test block has been moved out of a legacy if statement referencing appveyor. Co-authored-by: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com>
@NullVoxPopuli ah, that makes sense. I've updated the PR with the new changes for the help tests. |
See ember-cli/ember-cli#10394 Also fixed some of the line wrapping in other parts of the `ember serve` help text
Fixes #9512
ember serve
will now automatically choose a port (starting with 4200), unless a port is explicitly set with the--port
flag or the$PORT
env variable.Notes:
The base port has also been changed from 7020 (which seems to have been arbitrarily chosen in 43878e2) to 4200, the current default. The old value of 7020 also doesn't seem to do anything since it's overridden by the default 4200 anyways.
The
should throw error when -p PORT is taken
test block has been moved out of a legacy if statement referencing appveyor.