-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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: change default port to 4321 #7874
Conversation
🦋 Changeset detectedLatest commit: b14a807 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Would you mind adding a line about why it's changed at all? 🙂 |
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.
Left a small note for the CHANGELOG. We’ll also have a bunch of places that need updating in docs: https://github.com/search?q=repo%3Awithastro%2Fdocs%20%3A3000&type=code
Have we considered what happens when the port is busy with this change? Currently, if I run astro dev
, but another project is already running, Astro automatically increments the port number and uses 3001
instead (or 3002
etc. until it finds a free port). Is this now 4321
, 4322
, 4323
?
Someone suggested the idea and it made sense for us. 4, 3, 2, 1 ... launch! Also, 3000 is often used by other frameworks. |
That logic hasn't changed. So we incrementally find free ports like you said: |
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 Ema, looks good. We could mention our motivation in relation to @fflaten's comment, e.g. adding "in order to avoid conflicts with ports used by other tools" or something to the changelog.
I've never really cared one way or the other about this change, but docs look ok to me!
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.
I think there's still more places to change when I global-search for 3000
, e.g.
sandbox.config.json
("port": 3000
)astro.config.mjs
(site: 'http://localhost:3000'
)- Some READMEs
Since CI doesn't run all the integration tests, it would be good to confirm if they pass too locally.
4d93acd
to
5d23182
Compare
All README files says 4000 atm |
5d23182
to
e71027f
Compare
Cheers for the review. It should be OK now. |
e71027f
to
0065905
Compare
0065905
to
9ee5f88
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.
There's more instances of 3000
in devcontainer.json
:
"portsAttributes": {
"3000": {
"label": "Application",
"onAutoForward": "openPreview"
}
},
"forwardPorts": [3000],
.gitpod.yml
ports:
- port: 3000
And maybe the prefetch integration playwright.config.mjs
:
baseURL: process.env.PLAYWRIGHT_TEST_BASE_URL || 'http://localhost:3000',
cec0565
to
1f960e9
Compare
Co-authored-by: Chris Swithinbank <[email protected]>
1f960e9
to
b14a807
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.
Awesome!
Co-authored-by: Chris Swithinbank <[email protected]>
Co-authored-by: Chris Swithinbank <[email protected]>
Changes
Changes Astro's defualt port to
4321
Testing
Current tests should pass
Docs
/cc @withastro/maintainers-docs for feedback!