View source: R/runBackgroundApp.R
runBackgroundApp | R Documentation |
Run Shiny App in a Background Process
runBackgroundApp( ui = NULL, server = NULL, appFile = NULL, appDir = NULL, port = getOption("shiny.port"), host = getOption("shiny.host", "127.0.0.1"), stdout = "|", stderr = "|" )
ui |
The UI definition of the app. |
server |
A function with three parameters: |
appFile |
Path to a .R file containing a Shiny application |
appDir |
The application to run. Should be one of the following:
|
port |
The TCP port that the application should listen on (defaults to 3000). |
host |
The IPv4 address that the application should listen on. Defaults
to the |
stdout |
The name of the file the standard output of
the child R process will be written to.
If the child process runs with the |
stderr |
The name of the file the standard error of
the child R process will be written to.
In particular |
A callr::r_process object for the background Shiny app
## Not run: app <- system.file("apps/sever-info-app.R", package = "shinybg") bg_app <- runBackgroundApp(appFile = app, port = 3005) bg_app$kill() ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.