addResourcePath: Resource Publishing

Description Usage Arguments Details See Also Examples

View source: R/server.R

Description

Adds a directory of static resources to Shiny's web server, with the given path prefix. Primarily intended for package authors to make supporting JavaScript/CSS files available to their components.

Usage

1
addResourcePath(prefix, directoryPath)

Arguments

prefix

The URL prefix (without slashes). Valid characters are a-z, A-Z, 0-9, hyphen, period, and underscore; and must begin with a-z or A-Z. For example, a value of 'foo' means that any request paths that begin with '/foo' will be mapped to the given directory.

directoryPath

The directory that contains the static resources to be served.

Details

You can call addResourcePath multiple times for a given prefix; only the most recent value will be retained. If the normalized directoryPath is different than the directory that's currently mapped to the prefix, a warning will be issued.

See Also

singleton

Examples

1
addResourcePath('datasets', system.file('data', package='datasets'))

ymd526442121/Rproject_shiny documentation built on May 4, 2019, 5:31 p.m.