runApp(app) hosted in subdirectory

,

I'm not seeing any method, so I'm asking to find out if it's possible...

when hosting Shiny interactively (RStudio, R, etc) the default listener uses the root path from localhost with a random port... I can force the listener to use a specific IP and port, but the only place I see subdirectories (in the URL) is in context of hosted solutions such as Posit Connect.

is there any way to host Shiny as a subfolder rather than the root of the website?

Thanks in advance :slight_smile:

Please check my related answer here:

appreciate the info; I'd seen the router before.

it seems that the router will force all subdirectories to load into the same "shinyApp"... in my case I want to allow multiple apps, to coexist side-by-side, running in completely separate processes.

so i'm not sure the router is quite what i'm looking for.

You can run them in different processes e.g. via callr::r_bg.

Please check my related answer here:

Furthermore, you might want to check shinyApp()'s uiPattern parameter.