-
Notifications
You must be signed in to change notification settings - Fork 47
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
Auto Increment Port #263
Auto Increment Port #263
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.
Something makes my spidey senses tingle by auto incrementing an explicit port in an application automatically with no choice at all.
I'm inclined to only allow auto incrementing a port on the command line side of reload (which currently has a PR open #262) but I think there is a possible argument to be made that reload is development only feature and auto incrementing the port in a development environment can make things easier. I'd like to call on @kethinov and @Autre31415 for some second opinions here.
Depending on the result of this conversation the following action items required are:
- Put the auto increment behind an option and provide a console log stating that an auto increment occurred and what the new port reload is running on
- Re-run the GitHub Actions and fix errors
- Write tests
@@ -57,7 +57,7 @@ module.exports = function reload (app, opts, server) { | |||
} | |||
|
|||
// Application setup | |||
setupClientSideCode() | |||
// setupClientSideCode(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.
This is being done below in your changes so please remove the old call here
Some thoughts:
|
… the port if it is already in use. This commit adds the following to the existing work: * Added new tests * Added the port to reload's return object so the calling program knows what port reload ending up using if the port auto increments * Added autoIncrementPort optional param to realod to turn off auto port incrementing. Default `true` * Tweaked the code to work correctly, like handling the promise return correctly * Small tweaks to how the generated client side code replace works. Removed a branch that wasn't hitting in coverage and made it more readable * Updated README with API changes
Closing in favor of #278 |
… the port if it is already in use. This commit adds the following to the existing work: * Added new tests * Added the port to reload's return object so the calling program knows what port reload ending up using if the port auto increments * Added autoIncrementPort optional param to realod to turn off auto port incrementing. Default `true` * Tweaked the code to work correctly, like handling the promise return correctly * Small tweaks to how the generated client side code replace works. Removed a branch that wasn't hitting in coverage and made it more readable * Updated README with API changes
… the port if it is already in use. This commit adds the following to the existing work: * Added new tests * Added the port to reload's return object so the calling program knows what port reload ending up using if the port auto increments * Added autoIncrementPort optional param to realod to turn off auto port incrementing. Default `true` * Tweaked the code to work correctly, like handling the promise return correctly * Small tweaks to how the generated client side code replace works. Removed a branch that wasn't hitting in coverage and made it more readable * Updated README with API changes
Silently bumps the IP address if taken. Quick fix for several of the reported issues.