Skip to content
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

feat: add --open to deno serve to open server in browser #25340

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

HasanAlrimawi
Copy link
Contributor

@HasanAlrimawi HasanAlrimawi commented Sep 1, 2024

This PR addresses issue number #25149

Change:
Supported --open flag with deno serve -> (deno serve --open somescript.ts/js).
The action that takes place is openning the browser on the address that the server is running on.

Changes on code:

  • Added the flag --open to the serve flags as "open_site: bool".

Concerns:
The window tab will be opened on deno serve command no matter whether deno serve succeeds or fails.
The added test since it's a serve command then it starts listening for a request and never shuts down, I couldn't figure out how to shut it down same as other serve tests.

@HasanAlrimawi
Copy link
Contributor Author

@marvinhagemeister @dsherret
Could someone please take a look at this PR?
The problem lies with a test to assure that the change took effect, but because of deno serve nature then the test never shuts down/ends without some intervention which causes the CI checks to fail.

Is there a workaround or should I just remove the test?

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.

1 participant