Shiny default route?

Hi all,

I've set up a react.js app to be launched using a Shiny backend. Shiny provides the backend logic & a basic structure for index.html, which includes the react.js bundle which handles everything else, including client-side request routing.

I've been testing it out locally, & I keep getting a 404 error when I try to manually navigate to a different path, or refresh the page. I believe I've narrowed this down to failed server-side request routing by implementing hash-based routing in the react app (forcing requests to be handled by the client instead), which works fine, though leads to ugly url paths.

Any suggestions how I might force Shiny to handle all requests with the same response so I can remove the ugly hash-based routing paths? My initial tests with shiny.router didn't seem to help as I couldn't find a way to generate a wildcard match.



The shinyApp function has a uiPattern argument which might help. It is mentioned here: uiPattern = ".*"

Thanks very much - I bet that will work! RTFM, though I hadn't considered looking for it in shinyApp - I was expecting to need shiny.router. Not tested it but very likely to work. Marked as solved.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.