Fork me on GitHub
Ruben W23:11:51

I’m trying to use one index page for all my nested paths and I can’t figure out how to set the base path to load the initial index.html.js always from localhost/index.html.js. E.g.: - normal path which works: -> loads - nested path which doesn’t work: -> tries to load Is it possible to configure a base-path somewhere or should I handle this server-side and define some catch-all route to the index.html.js?


@freakinruben are you looking for a single page app?


paths start with #

Ruben W23:11:51

yeah, but I want to use html5history api.. which works if I start navigating from index page.. But if I click on a link, and then refresh I get the problem described above 😉

Ruben W23:11:35

html5history api can ofcourse be used with #, but I’m trying to do it without


so that would be on the server side of things then


if it works before a refresh then the issue is the path attempting to load from the server

Ruben W23:11:41

right, unless there is a possibility to define a <base .. > in the generated html by hoplon


if I just go to localhost/nested/path how does it know to use the index page? It would need a server which always returns the index no matter the path

Ruben W23:11:26

true, I have a catch all handler that always returns the hoplon generated index.html. The problem is inside the generated index.html, which tries to load the index.html.js from a relative path


ah I see what you mean,

Ruben W23:11:06

if it’s not possible, I can try to define a catch-all route for the index.html.js so it’s always returned, but from a caching perspective that’s not optimal


we have a base element