Multiple Shiny apps on a signle Quarto web page
Closed this issue · 2 comments
Thanks for making this available. I have a number of teaching demos which do really light computation, so will work well in the browser, this will help me get around issues I'm having with websockets in my shiny server.
I've got a number of Rmd files which have effectively two shiny apps on them.
NormalCalculator.qmd.txt
The outline of the file in question is:
---
title: "Normal Calculator"
output: html
filters:
- shinylive
---
## Normal Probabilities
```{shinylive-r}
#| standalone: true
library(shiny)
ui <- fluidPage(
# ...
)
server <- function (input, output) {
# ...
}
shinyapp(ui,sever)
```
## Normal Quantiles
```{shinylive-r}
#| standalone:true
library(shiny)
ui1 <- fluidPage(
# ...
)
server1 <- function(input,output) {
# ...
}
shinyapp(ui1,server1)
```
If I delete either of the apps, it runs as expected. However, with both it generates an error.
All of the input fields in ui
and ui1
have different names, so in theory, I could combine the servers. However, it is really nice to be able to use markdown rather than R code to specify the HTML text that appears between the two apps.
Any suggestions on how I can get more than one shinyapp on the same page?
Hi,
I tried building your NormalCalculator.qmd
document on the latest release of Shinylive, and it seemed to work OK (see below). Can you try updating the shinylive
package in R and building your Quarto document again?
If you still have issues can you let me know the details about the error message that you see, and let me know of any other errors shown in your browser's Developer Tools panel?
Thanks!
Closing as appears to be fixed