plumber (version 1.0.0)

pr_static: Add a static route to the plumber object

Description

Add a static route to the plumber object

Usage

pr_static(pr, path, direc)

Arguments

pr

A Plumber API. Note: The supplied Plumber API object will also be updated in place as well as returned by the function.

path

The mounted path location of the static folder

direc

The local folder to be served statically

Examples

Run this code
# NOT RUN {
pr() %>%
  pr_static("/path", "./my_folder/location") %>%
  pr_run()
# }
# NOT RUN {
# }

Run the code above in your browser using DataCamp Workspace