Skip to content

question: should PORT=0 behave the same as --port=0 in deno serve? #29457

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

Open
iuioiua opened this issue May 26, 2025 · 1 comment
Open

question: should PORT=0 behave the same as --port=0 in deno serve? #29457

iuioiua opened this issue May 26, 2025 · 1 comment

Comments

@iuioiua
Copy link
Contributor

iuioiua commented May 26, 2025

It currently doesn't. Happy to implement.

> deno serve --port=0 y.ts
deno serve: Listening on http://0.0.0.0:53470/
> PORT=0 deno serve main.ts
deno serve: Listening on http://0.0.0.0:8000/
@marvinhagemeister
Copy link
Contributor

Yes, they should behave the same. Port 0 is a special value that is used to tell the OS to pick a random port.

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

No branches or pull requests

2 participants