0

How can I run 3 different shiny apps, each embedded on its own html side on the same port?

For example in shiny server I would be able to access the specific apps in HTML iframe through

http://<server-address>:3838/appName. 

I wondered if it would be a good idea to run one server script which calls and starts the according app by shiny::runApp() (on an other port, 2 are still ok but not more), depending which html side is open? but then again how can I input this into the Rscript ( something like

*parseQueryString(session$clientData$url_search)* and ../?app=appName 

which gets called by iframe? )

I also looked into shiny modules but then again, how can it call the specific app which should be shown on the website

Hack-R
  • 22,422
  • 14
  • 75
  • 131
  • Welcome to Stack Overflow! Please review the use of formatting in questions. Stack Exchange, including Stack Overflow, is geared towards structured, well-curated questions and answers, as opposed to a forum. You'll also want to capitalize sentences properly, for example. Finally, this question could always benefit from a [reproducible](https://stackoverflow.com/q/5963269/1422451) example per the [MCVE](https://stackoverflow.com/help/mcve) and [`r`](https://stackoverflow.com/tags/r/info) tag description. Please compare your original question with the edited version to get an idea. – Hack-R Jul 23 '18 at 20:59
  • When you call `runApp()` it runs on one server/port. You cannot have multiple shiny apps running on the same server/port. You could create a separate web server which redirects requests to shiny server instances that aren't otherwise directly accessible (like a proxy) but that would require some other software than a shiny app). Really this question is too general to be directly answerable. It would help to have some sort of reproducible example that makes it more clear what your requirements are. – MrFlick Jul 23 '18 at 21:14
  • 2
    Maybe the RStudio Community page is better for general questions: https://community.rstudio.com/c/shiny – MrFlick Jul 23 '18 at 21:15
  • Yes, I agree with everything in the @MrFlick comment. I could add a couple of other guesses at potential solutions from some npm library I think I used for similar purposes by handling some routing for you, but I'm not sure this really makes sense and it's not the normal case for sure. I think the best answer is just "no". If you tell me that you insist then I will go find that library for you. – Hack-R Jul 23 '18 at 22:37
  • thank you very much, after a few days of trying I took MrFlicks method with creating a separate web server which redirects. – William A. Shimp Jul 26 '18 at 08:45

0 Answers0