-
Notifications
You must be signed in to change notification settings - Fork 5.6k
feat(ext/http): Show that is also listening on localhost #28171
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
This isn't equivalent at all. |
Thanks for the insights, I'll redo it |
With additional bit of text you mean like:
? Or just showing |
This seems like the ideal behavior to me, if you're willing to implement it. |
ext/http/00_serve.ts
Outdated
? `(accessible via http://localhost:${addr.port})` | ||
: ""; | ||
|
||
import.meta.log("info", `Listening on ${url} ${helper}`); |
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.
nit: the space between url and helper should be part of the helper string
ext/http/00_serve.ts
Outdated
import.meta.log("info", `Listening on ${scheme}${host}:${addr.port}/`); | ||
const url = `${scheme}${host}:${addr.port}/`; | ||
const helper = addr.hostname === "0.0.0.0" || addr.hostname === "::" | ||
? `(accessible via http://localhost:${addr.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.
? `(accessible via http://localhost:${addr.port})` | |
? `(accessible via ${scheme}://localhost:${addr.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.
LGTM, thanks
Closes #27722
This will show
Listening on http://0.0.0.0:8000 (accessible via http://localhost:8000)