Skip to content

public folder does not work as advertised #232

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
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

clemens-tolboom
Copy link

When having just the ./public folder the default behaviour is serving an empty page. So I changed the text accordingly.

I rather had the API pages still intact and it would be great that get access to it even after creating a ./public/index.

When having just the ./public folder the default behaviour is serving an empty page. So I changed the text accordingly.

I rather had the API pages still intact and it would be great that get access to it even after creating a ./public/index.
@clemens-tolboom
Copy link
Author

Hmmm ... my conclusion was wrong. Curl reports 404 Not found but the body contains {} maybe the right respons?

curl -vvvv http://localhost:3000/
*   Trying ::1...
* connect to ::1 port 3000 failed: Connection refused
*   Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 3000 (#0)
> GET / HTTP/1.1
> Host: localhost:3000
> User-Agent: curl/7.43.0
> Accept: */*
> 
< HTTP/1.1 404 Not Found
< X-Powered-By: Express
< Vary: Origin, Accept-Encoding
< Access-Control-Allow-Credentials: true
< Cache-Control: no-cache
< Pragma: no-cache
< Expires: -1
< X-Content-Type-Options: nosniff
< Content-Type: application/json; charset=utf-8
< Content-Length: 2
< ETag: W/"2-mZFLkyvTelC5g8XnyQrpOw"
< Date: Sun, 07 Feb 2016 11:58:23 GMT
< Connection: keep-alive
< 
* Connection #0 to host localhost left intact
{}%

This now seems to me as when creating a public folder you must add an index.html with it.

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