Learn R Programming

xfun (version 0.48)

new_app: Create a local web application

Description

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).

Usage

new_app(name, handler, open = interactive(), ports = 4321 + 1:10)

Value

The app URL of the form http://127.0.0.1:port/custom/name/.

Arguments

name

The app name (a character string, and each app should have a unique name).

handler

A function that takes the HTTP request information (the first argument is the requested path) and returns a response.

open

Whether to open the app, or a function to open the app URL.

ports

A vector of ports to try for starting the server.