inst/templates/microservice/entrypoints/plumber-foreground.R

################################################################################
## plumber: Quick Start Guide
## <https://www.rplumber.io/index.html>
################################################################################
endpoint_path <- usethis::proj_path("inst", 'endpoints', '{endpoint_name}.R')
plumber <- plumber::Plumber$new(endpoint_path)
plumber$setDocsCallback(NULL)
plumber$run(host = '{host}', port = {port})

Try the usethat package in your browser

Any scripts or data that you put into this service are public.

usethat documentation built on Sept. 20, 2021, 5:08 p.m.