Closed davetapley closed 1 year ago
For me it works with empty codespace (which by default has Node 20 -- not sure if that could be different to Node 18).
Navigate to http://localhost:8080/ in browser and see files
Note that the URL in browser address bar needs to be something like https://foo-bar-baz-8080.app.github.dev/ -- if you actually try to open localhost in your browser it won't work.
Also: when you're running http-server in terminal, you should see a log of all the URLs that were served -- does it produce any output when you try to open the codespace URL in a browser?
@zbynek well that's embarrassing, I also cannot repro in an empty Codespace, because:
I just realized there's already a different web-server running on 8080
on my other Codespace,
but weirdly I didn't get a Error: listen EADDRINUSE: address already in use 0.0.0.0:8080
when trying to start http-server
🤔
The other server is defined via dockerComposeFile
in the devcontainer.json
. I'll do some more digging, but probably safe to say not a http-server
issue...
Environment Versions
v18.17.1
v14.1.1
Steps to reproduce
npx http-server
Expected result
Navigate to http://localhost:8080/ in browser and see files
Actual result
Navigate to http://localhost:8080/ and see:
...
Other information
I'm not 100% sure if this is
http-server
or Codespace, but I figured I'd open in case others see / can reproduce.If I
curl localhost:8080
in the Codespace I can see the listing just fine, and https://ngrok.com/ works too.See also: https://github.com/orgs/community/discussions/64558