Open AcidLeroy opened 6 years ago
Check this issue for more information: https://github.com/choojs/choo/issues/666
I'm having the same problem. I'd love it if my choo routes were interpreted to be relative to the directory from which the app is served (as opposed to the domain root), but I can't figure out how to do this.
@AcidLeroy If you are comfortable putting the path prefix you deploy to in your code, I was able to get your scenario to work like so:
let app = choo({ hash: true });
app.route('/some/path', mainView);
app.route('/some/path/users/:user_id', userView);
But I'd love it if someone could help me get this to work without including the deployment path in the source of the app. I.e. using paths relative to the deployment path.
This is more of a help wanted issue. The problem that I am having is that I am attempting to put a choo.js app that is not on the root path of site, i.e. mysite.com/#userid. Instead, I am attempting to run the site on mysite.com/biz/baz/myapp/#userid. What do I need to do, assuming I don't have server control, to get my hash routes to work on an arbitrary root location on the path?
I've tried the following and this didn't work for me:
Is there a trick that I need to do in order to stick my choo app on a subregion of mysite?
Thanks!