Skip to content

Support for wsl development #1012

@parthakadam2007

Description

@parthakadam2007

Chore

Describe the chore

When starting the dev server, the console prints the following message:
Server is running on http://0.0.0.0:1337
0.0.0.0 is the bind address, but it is not a valid URL to access in a browser. This can be confusing, especially in environments like WSL2, where accessing the API must be done through:
http://localhost:1337
Improving the startup log to display a browser-friendly URL would enhance the developer experience.

Suggested improvement

const displayHost = host === "0.0.0.0" ? "localhost" : host;
console.log(`Server running at http://${displayHost}:${port} (bound to ${host})`);

Additional context

Running on WSL2 (Ubuntu)
Node v20
Initially thought server was unreachable because browser cannot open http://0.0.0.0:1337

Add any other context or screenshots that help clarify the task.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions