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

deno --init serve: http://0.0.0.0:8000 does not work with Safari #27722

Open
drernie opened this issue Jan 18, 2025 · 4 comments
Open

deno --init serve: http://0.0.0.0:8000 does not work with Safari #27722

drernie opened this issue Jan 18, 2025 · 4 comments
Labels
bug Something isn't working correctly good first issue Good for newcomers serve

Comments

@drernie
Copy link

drernie commented Jan 18, 2025

Version: Deno 2.1.6 (and 2.1.4)

I tried to create and run a new project on my ARM Mac:

deno --init serve

When I pasted http://0.0.0.0:8000/ into Safari, I just got "about:blank".

I discovered it works correctly on Chrome.

Surprisingly, http://127.0.0.1:8000 (and localhost) work on Safari. Would it make more sense to tell people that?

@drernie drernie changed the title deno --init serve: http://localhost:8000 does not work with Safari deno --init serve: http://0.0.0.0:8000 does not work with Safari Jan 18, 2025
@drernie
Copy link
Author

drernie commented Jan 18, 2025

Also, maybe it is just me, but I found it disturbing that 'hello.js' was text to be rendered rather than a script to be run. Shouldn't that be a "hello.txt" or even an HTML file?

@dsherret
Copy link
Member

dsherret commented Jan 19, 2025

Also, maybe it is just me, but I found it disturbing that 'hello.js' was text to be rendered rather than a script to be run. Shouldn't that be a "hello.txt" or even an HTML file?

It's a static folder, which contains static assets and static assets might be javascript files for the client. You can define how it behaves in main.ts. Yeah, for demonstrational purposes it might be better if it expanded on the example and had more static files.

Surprisingly, http://127.0.0.1:8000 (and localhost) work on Safari. Would it make more sense to tell people that?

Yeah, I think it would be better to show localhost so that it works in more cases.

@dsherret dsherret added bug Something isn't working correctly serve good first issue Good for newcomers labels Jan 19, 2025
@EliasLeguizamon123
Copy link

Hi @dsherret i can check this one ?

@marvinhagemeister
Copy link
Contributor

sure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly good first issue Good for newcomers serve
Projects
None yet
Development

No branches or pull requests

4 participants