An experimental function to create a local web application based on R's
internal httpd
server (which is primarily for running R's dynamic help
system).
new_app(name, handler, open = interactive(), ports = 4321 + 1:10)
The app URL of the form http://127.0.0.1:port/custom/name/
.
The app name (a character string, and each app should have a unique name).
A function that takes the HTTP request information (the first argument is the requested path) and returns a response.
Whether to open the app, or a function to open the app URL.
A vector of ports to try for starting the server.