plumber icon indicating copy to clipboard operation
plumber copied to clipboard

Documentation issues

Open akgold opened this issue 3 years ago • 0 comments

  • Exit hooks are possible, and very useful for e.g. closing db connections, but exit as an allowable stage is not documented. Example:
con <- DBI::dbConnect(odbc::odbc(), "my_db")

pr %>%
  plumber::pr_hook("exit", function(req) {
    DBI::dbDisconnect(con)
})
  • Hook stages are not explained. e.g. when is "preserialize"?
  • It's not clear from the docs how to use hooks and deploy to RStudio Connect (or in general?). From the plumber examples repo, I figured out there's an @plumber comment + a function that takes pr as an argument. I just copied this boilerplate, but can't find anywhere this is explained.

akgold avatar Mar 11 '21 16:03 akgold