hyperapp-router icon indicating copy to clipboard operation
hyperapp-router copied to clipboard

How do I set the public path aka basename?

Open Pyrolistical opened this issue 6 years ago • 2 comments

On my local, I use http://localhost:8080/greetings, but deployed its https://production/some-path/greetings

In my code, I want to write <Route path="/greetings" render={Greetings} /> and have it work in both dev and production

React-router has this: https://reacttraining.com/react-router/web/api/BrowserRouter/basename-string

Pyrolistical avatar Mar 13 '18 21:03 Pyrolistical

Let's add basename then. 👍

jorgebucaran avatar Mar 14 '18 03:03 jorgebucaran

I agree. I needed it in some projects. And the concatenation trick is not really useful.

Swizz avatar Mar 14 '18 08:03 Swizz