AppManager | R Documentation |
Manage shiny apps running in background tasks.
apps
(list) list of running shiny apps named for their
print()
print method for the AppManager
class
AppManager$print(x, ...)
x
self
...
ignored
register_app()
Register an app
AppManager$register_app(port, app)
port
TCP port the app is listening on (e.g., 3000)
app
callr::r_process for a Shiny app
nothing returned
retrieve_app()
Retrieve a registered app
AppManager$retrieve_app(port)
port
TCP port the app is listening on (e.g., 3000)
callr::r_process for a Shiny app
view_app()
View background Shiny application
AppManager$view_app(port)
port
TCP port the app is listening on (e.g., 3000)
(Invisibly) The application's URL.
kill_app()
Kill an app's process and deregister it
AppManager$kill_app(port, verbose = TRUE)
port
TCP port the app is listening on (e.g., 3000)
verbose
(logical) Should messages be printed to the console?
TRUE
if the process was terminated, and FALSE
if it was not
kill_all_apps()
Kill all registered apps
AppManager$kill_all_apps(verbose = TRUE)
verbose
(logical) Should messages be printed to the console?
Nothing returned
list_ports()
List ports used by registered apps
AppManager$list_ports()
Character vector with 0 or more elements
clone()
The objects of this class are cloneable with this method.
AppManager$clone(deep = FALSE)
deep
Whether to make a deep clone.
## Not run: # Make a stub manager <- AppManager$new() manager # Create background shiny apps app <- system.file("apps/sever-info-app.R", package = "shinybg") app1 <- runBackgroundApp(appFile = app, port = 3001) app2 <- runBackgroundApp(appFile = app, port = 3002) # Register the apps manager$register_app(port = 3001, app = app1) manager$register_app(port = 3002, app = app2) # List all managed apps manager manager$list_ports() # Retrieve app by port manager$retrieve_app(port = "3001") # Kill all apps manager$kill_all_apps() ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.