% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/shinylive-link.R
\name{shinylive_directory}
\alias{shinylive_directory}
\title{Create Shinylive sharelinks from a directory of Shiny apps}
\usage{
shinylive_directory(
  directory_path,
  engine,
  mode = "editor",
  header = TRUE,
  app_file = NULL,
  base_url = NULL
)
}
\arguments{
\item{directory_path}{Character string specifying the path to the directory containing Shiny app directories}

\item{engine}{Engine to use: "r" for R Shiny or "python" for Python Shiny}

\item{mode}{Shinylive display mode (default \code{"editor"}). \code{"editor"} shows an
editable code panel beside the running app; \code{"app"} shows only the running app.}

\item{header}{Logical, whether to show the Shinylive header bar. It applies only
when \code{mode = "app"} and is ignored in the default \code{"editor"} mode. Defaults to \code{TRUE}.}

\item{app_file}{Main app filename to look for (default: "app.R" for R, "app.py" for Python)}

\item{base_url}{Custom Shinylive base URL. If NULL (default), links point at https://shinylive.io.}
}
\value{
shinylive_directory object containing URLs and metadata for all found apps
}
\description{
Batch processes directories containing Shiny applications to create individual Shinylive links.
Each subdirectory is treated as a separate Shiny app project.

Only text files with extensions .R, .py, .txt, .md, .csv, .json, .yaml, or
.yml are embedded in a link. Other files (for example images or binary data)
are skipped with a warning.
}
\examples{
# Each app lives in its own subdirectory:
#   shiny_apps/
#     app1/app.R
#     app2/app.R
shiny_apps <- tempfile()
dir.create(file.path(shiny_apps, "app1"), recursive = TRUE)
dir.create(file.path(shiny_apps, "app2"), recursive = TRUE)
writeLines("library(shiny)", file.path(shiny_apps, "app1", "app.R"))
writeLines("library(shiny)", file.path(shiny_apps, "app2", "app.R"))

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

# Extract just the URLs
repl_urls(links)

}
