Hi there, in the Elm guide, there’s a section on URL parsing where Evan goes through some examples of nested routes.
-- /blog/42 -- /blog/123 -- /blog/mosaic
I’m wondering how to get my app (in development and also production) to load blog/42 if I start there initially (e.g. type in localhost:8000/blog/42 or www.mysite.com/blog/42 in the navigation bar).
What DOES work:
I can do an initial load on a non nested route like /blog. Note this requires the --pushstate option on elm-live, which is what I’m using for development.
I can also click and navigate to /blog/42 by initially loading the home page and clicking a link to it. I.e. it’s the when I start at localhost:8000/blog/42 or www.example.com/blog/42 where I run into problems.
Looking at my console, it appears my server (elm-live here) is looking for my static content (index.html and elm.js) inside the ./blog directory in my project. That directory doesn’t exist, and so I get an error.
Anyone have any suggestions or ways to get around this?
Please let me know if anything is not clear and I’d be happy to clarify more, thank you!