| new_app {xfun} | R Documentation |
Create or stop a local web application
Description
Create a local web application based on R's internal httpd.
Usage
new_app(name, handler, open = interactive(), host = "127.0.0.1", port = NULL)
stop_app(name = names(.proxy$apps))
Arguments
name |
App name (a character string). Use |
handler |
A function with signature |
open |
Whether to open the app URL in a browser, or a function to open
it. In non-interactive sessions this also controls whether the call
blocks: passing |
host |
Bind address for the proxy ( |
port |
Candidate proxy ports when |
Details
new_app() has two modes:
-
name = '': start an app behind a lightweight proxy athttp://host:PORT/, forwarding to R's internal httpd path/custom/xfun:PORT/. -
name != '': register a legacy app directly on R's internal httpd athttp://127.0.0.1:BACKEND/custom/name/(compatible with older versions).
stop_app() deregisters one or more running apps.
Value
new_app() returns the app URL invisibly. stop_app() returns
nothing.