Skip to contents

Batch processes directories containing Shiny applications to create individual Shinylive links. Each subdirectory is treated as a separate Shiny app project.

Usage

shinylive_directory(
  directory_path,
  engine,
  mode = "editor",
  header = TRUE,
  app_file = NULL,
  base_url = NULL
)

Arguments

directory_path

Character string specifying the path to the directory containing Shiny app directories

engine

Engine to use: "r" for R Shiny or "python" for Python Shiny

mode

Shinylive mode: "editor" (show code editor) or "app" (show app only)

header

Logical. Whether to show header in app mode (default: TRUE)

app_file

Main app filename to look for (default: "app.R" for R, "app.py" for Python)

base_url

Custom Shinylive base URL. If NULL, uses default Shinylive URL

Value

shinylive_directory object containing URLs and metadata for all found apps

Examples

if (FALSE) { # \dontrun{
# Process directory of R Shiny apps
# Directory structure:
# shiny_apps/
#   ├── app1/
#   │   ├── app.R
#   │   └── utils.R
#   └── app2/
#       ├── app.R
#       └── data.csv

links <- shinylive_directory("./shiny_apps/", engine = "r", mode = "editor")
print(links)

# Process directory of Python Shiny apps without header
links <- shinylive_directory("./py_apps/", engine = "python", mode = "app", header = FALSE)
} # }