Run an application with shinyjster enabled

run_jster(
  appDir,
  port = 8000,
  host = "127.0.0.1",
  browser = getOption("browser")
)

run_jster_apps(
  apps,
  type = c("serial", "callr", "lapply"),
  cores = parallel::detectCores(),
  port = NULL,
  host = "127.0.0.1",
  browser = getOption("browser")
)

Arguments

appDir

The application to run. Should be one of the following:

  • A directory containing server.R, plus, either ui.R or a www directory that contains the file index.html.

  • A directory containing app.R.

  • An .R file containing a Shiny application, ending with an expression that produces a Shiny app object.

  • A list with ui and server components.

  • A Shiny app object created by shinyApp().

port

The TCP port that the application should listen on. If the port is not specified, and the shiny.port option is set (with options(shiny.port = XX)), then that port will be used. Otherwise, use a random port between 3000:8000, excluding ports that are blocked by Google Chrome for being considered unsafe: 3659, 4045, 5060, 5061, 6000, 6566, 6665:6669 and 6697. Up to twenty random ports will be tried.

host

The IPv4 address that the application should listen on. Defaults to the shiny.host option, if set, or "127.0.0.1" if not. See Details.

browser

a non-empty character string giving the name of the program to be used as the HTML browser. It should be in the PATH, or a full path specified. Alternatively, an R function to be called to invoke the browser.

Under Windows NULL is also allowed (and is the default), and implies that the file association mechanism will be used.

apps

Vector of appDir values

type

Single value to determine how applications are executed.

'serial'

Runs apps one after another using lapply. port will be random for each app unless specified.

'callr'

Runs apps using callr::r_bg using cores cores. port will be random for each app to allow concurrent execution.

'lapply'

Runs apps in succession using lapply. port will be random for each app unless specified.

cores

Number of cores (if needed) to execute on.

Functions

  • run_jster(): Run a single shiny application with shinyjster enabled

  • run_jster_apps(): Run a set of Shiny applications with shinyjster enabled