-
-
Notifications
You must be signed in to change notification settings - Fork 32
chore: using the param instead of calling a function #1224
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
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| logger.info(`Spotlight listening on ${info.port}`); | ||
| if (basePath) { | ||
| logSpotlightUrl(realPort); | ||
| logSpotlightUrl(info.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.
Dynamic port logging may show configured port instead of actual
When using port 0 for dynamic assignment (default for spotlight run), the old code explicitly retrieved the actual bound port via server.address() and stored it in a variable named realPort. The new code uses info.port from the callback parameter. If @hono/node-server passes back the configured port (0) rather than the actual bound port from AddressInfo, the log messages "Spotlight listening on 0" and "Open http://localhost:0 to see the Spotlight UI" would be displayed, which are incorrect and unusable. The explicit realPort naming in the original code suggests this distinction was intentional.
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.
I checked, its working with dynamic 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.
If this works with the dynamic port, look much cleaner nice!
No description provided.