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

Nested routes #5

Closed
lazarljubenovic opened this issue Jul 18, 2018 · 1 comment
Closed

Nested routes #5

lazarljubenovic opened this issue Jul 18, 2018 · 1 comment

Comments

@lazarljubenovic
Copy link

Not sure if I'm doing something wrong, but...

Running the server with this

$ yarn http-server-spa . index.html

in a simple folder with an index.html that points to index.js, the following work as expected.

http://localhost:8080/
http://localhost:8080/foo

However, this one breaks.

http://localhost:8080/foo/bar

The error:

GET http://localhost:8080/foo/index.js 404 (Not Found)

Here's the console output since running, through all steps above, until the last one.

----------------------------------------------
[OK] Serving static files from ./.
[OK] Using the fallback file index.html
[OK] Listening on http://localhost:8080
----------------------------------------------
[OK] GET /foo/bar
[ER] GET /foo/index.js
[OK] GET /
[OK] GET /index.js
[OK] GET /foo
[OK] GET /index.js
[OK] GET /foo/bar
[ER] GET /foo/index.js
@lazarljubenovic
Copy link
Author

Oh man 😂 It was becaseof my inedx.html file having src="index.html" instead of src="/index.html".

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

1 participant