Skip to content
This repository has been archived by the owner on Jan 22, 2020. It is now read-only.

How can a basename be set for your example app? (browserHistory) #178

Open
Richacinas opened this issue Sep 26, 2016 · 2 comments
Open

How can a basename be set for your example app? (browserHistory) #178

Richacinas opened this issue Sep 26, 2016 · 2 comments

Comments

@Richacinas
Copy link

I was wondering how could we set a basename for this application. It is a normal usage to have the project hosted on a folder inside our virtual host.

Something like this:

const browserHistory = useRouterHistory(createHistory)({
    basename: '/project-folder'
});

being passed to our Router, is causing an error like:

Error: Invariant Violation: Browser history needs a DOM

Anybody could explain how to properly set up a baseurl so client side and server side routing works the same way?

@samsel
Copy link
Contributor

samsel commented Dec 9, 2016

@Richacinas base url as in similar to mount path in express?

@Richacinas
Copy link
Author

@samsel I'm not sure, I searched a little bit and don't really know how to answer to your question. I'm talking about the classic base url that we set up on a project so when we access to a path relative to root on links, scripts, statics... it prepends that base url to '/'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants