Skip to content
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

feat(dev): get available port if not available #871

Merged
merged 2 commits into from
Jan 27, 2022
Merged

feat(dev): get available port if not available #871

merged 2 commits into from
Jan 27, 2022

Conversation

mcansh
Copy link
Collaborator

@mcansh mcansh commented Dec 3, 2021

uses get-port instead of incrementing by 1 like #844 and #746

also applies the port checking to the devServerPort

closes #863, #844, and #746

Signed-off-by: Logan McAnsh logan@mcan.sh

@remix-cla-bot
Copy link
Contributor

remix-cla-bot bot commented Dec 3, 2021

Thank you for signing the Contributor License Agreement. Let's get this merged! 🥳

@mcansh mcansh changed the title chore(dev): get available port if process.env.PORT or 3000 arent available chore(dev): get available port if not available Dec 3, 2021
@mcansh mcansh changed the base branch from main to dev December 3, 2021 16:28
Copy link
Contributor

@tascord tascord left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

@ryanflorence
Copy link
Member

Let's rebase this on current dev, the config changed a bit.

@ryanflorence
Copy link
Member

Also, can LiveReload do the same?

@mcansh
Copy link
Collaborator Author

mcansh commented Dec 17, 2021

Also, can LiveReload do the same?

yeah it does, but we'll need to tell LiveReload in root.tsx about the new port

@sergiodxa
Copy link
Member

Shouldn’t

let port = process.env.PORT || 3000;
do the same?

Copy link
Member

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be quite nice! Maybe you could add #1277 to this one? Otherwise the PR is only marginally useful.

Copy link
Member

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. Would love to get this combined with #1352

…lable

Signed-off-by: Logan McAnsh <logan@mcan.sh>
Signed-off-by: Logan McAnsh <logan@mcan.sh>
Copy link
Member

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@kentcdodds kentcdodds changed the title chore(dev): get available port if not available feat(dev): get available port if not available Jan 27, 2022
@kentcdodds kentcdodds merged commit 362a97f into dev Jan 27, 2022
@kentcdodds kentcdodds deleted the logan/port branch January 27, 2022 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: Graceful port suggestion if 3000 is taken
5 participants