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 usethis2 package in your browser

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

usethis2 documentation built on Aug. 10, 2021, 5:07 p.m.