-
-
Notifications
You must be signed in to change notification settings - Fork 5k
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(server): preserve random port when restarting #5793
Conversation
Can we move used port variable to the listener.js file? Memorizing random port and reusing it again. |
Will do it :) |
Codecov Report
@@ Coverage Diff @@
## dev #5793 +/- ##
==========================================
+ Coverage 95.66% 95.67% +<.01%
==========================================
Files 82 82
Lines 2675 2679 +4
Branches 685 685
==========================================
+ Hits 2559 2563 +4
Misses 98 98
Partials 18 18
Continue to review full report at Codecov.
|
Thanks @pi0 for the refactor and tests ❤️ I reviewed and approve (but cannot through GH since I am the author of the PR). |
Types of changes
Description
It's only for
nuxt dev
command.When the given port is already used and Nuxt uses a random port, changing
nuxt.config.js
will restart the server but it will assign another port again and the DX is ruined.This PR aims to re-uses the same port when a random port is assigned at first.
Checklist:
-> Will need some help here @clarkdo 🙏