-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
feat: improve host
option
#3112
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3112 +/- ##
==========================================
- Coverage 92.16% 91.87% -0.29%
==========================================
Files 37 37
Lines 1289 1293 +4
Branches 345 349 +4
==========================================
Hits 1188 1188
- Misses 96 98 +2
- Partials 5 7 +2
Continue to review full report at Codecov.
|
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.
Need some improve
Also need rebase |
31301a2
to
12a92fa
Compare
12a92fa
to
cec5891
Compare
Small improvements here, I was wrong about handling error, let's keep as is, because Node.js output the same message |
this.hostname = hostname; | ||
if (hostname === 'local-ip') { | ||
this.hostname = | ||
internalIp.v4.sync() || '0.0.0.0' || internalIp.v6.sync() || '::'; |
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.
Wouldn't this be a dead code, since '0.0.0.0'
can be never false
?
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.
Oh, yep, we need change it to internalIp.v4.sync() || internalIp.v6.sync() || '0.0.0.0'
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.
Feel free to send a fix
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.
fixed here #3128
For Bugs and Features; did you add new tests?
Yes
Motivation / Use-Case
Improve
host
option by merging withuse-local-ip
.Now
host
option can accept -local-ip
,local-ipv4
,local-ipv6
.Breaking Changes
useLocalIp
option was removed.Additional Info