Auto Increment Port #263
Conversation
There was a problem hiding this comment.
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
|
|
||
| // Application setup | ||
| setupClientSideCode() | ||
| // setupClientSideCode(port) |
There was a problem hiding this comment.
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.