#' create_api
#'
#' create the dirctory containing the plumber API and Dockerfile necessary to create
#' a Docker image for the polished API.
#'
#' @param dir_path the path to the directory that will contain the newly created
#' plumber API and Dockerfile.
#'
#' @return nothing
#'
#' @export
#'
#' @examples
#'
#' \dontrun{
#' create_api()
#' }
#'
#'
create_api <- function(dir_path = "./polished_api") {
api_dir <- system.file("plumber", package = "polishedapi")
files <- c(
file.path(api_dir, "api"),
file.path(api_dir, "Dockerfile")
)
dir.create("polished_api")
file.copy(
from = files,
to = dir_path,
overwrite = TRUE,
recursive = TRUE,
copy.mode = TRUE
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.