Skip to content

fix: show actual bind address in startup logs#6999

Merged
CommanderStorm merged 6 commits intolouislam:masterfrom
mixelburg:fix/clarify-bind-address-startup-log
Feb 23, 2026
Merged

fix: show actual bind address in startup logs#6999
CommanderStorm merged 6 commits intolouislam:masterfrom
mixelburg:fix/clarify-bind-address-startup-log

Conversation

@mixelburg
Copy link
Copy Markdown
Contributor

Fixes #6956

When no custom hostname is configured, the server binds to all interfaces (0.0.0.0), but the startup log either showed just the port number or localhost, which could be misleading — implying the server is only accessible on loopback.

This updates both server.js and setup-database.js to display 0.0.0.0 as the bind address when no hostname is explicitly set, accurately reflecting that the server is listening on all interfaces.

When no custom hostname is configured, the server binds to all
interfaces (0.0.0.0), but the log message either showed just the port
number or 'localhost', which is misleading. Now correctly displays
0.0.0.0 as the bind address.
Copilot AI review requested due to automatic review settings February 20, 2026 22:04

This comment was marked as resolved.

Copy link
Copy Markdown
Owner

@louislam louislam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like 0.0.0.0. Please see my comment in 6956.

Instead of showing 0.0.0.0, list all available URLs similar to Vite dev server:
  Local:   http://localhost:3001
  Network: http://192.168.1.100:3001

Applied consistently across server.js, setup-database.js, and simple-migration-server.js
const nets = networkInterfaces();
for (const name of Object.keys(nets)) {
for (const net of nets[name]) {
if (!net.internal && net.family === "IPv4") {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why the ipv4 check?
We likely should show all the interaces we bound to.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also we have function in js. Copy-and-paste is not a good idea, or it is AI code?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

f, ur right

mixelburg and others added 3 commits February 21, 2026 21:17
- Added printServerUrls() to util-server.js to avoid code duplication
- Lists all network addresses (IPv4 + IPv6) like Vite dev server
- Applied across server.js, setup-database.js, and simple-migration-server.js
- Remove unused 'log' import in simple-migration-server.js
- Add @returns {void} to printServerUrls JSDoc in util-server.js
Copy link
Copy Markdown
Collaborator

@CommanderStorm CommanderStorm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as intented, thanks

@CommanderStorm CommanderStorm enabled auto-merge (squash) February 23, 2026 14:00
Copy link
Copy Markdown
Owner

@louislam louislam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work, work as expected.

Image

@CommanderStorm CommanderStorm merged commit 1de2760 into louislam:master Feb 23, 2026
24 checks passed
@CommanderStorm CommanderStorm added this to the 2.2.0 milestone Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clarify bind address in startup logs

4 participants