We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Given the following plumber.R:
library(plumber) #* @apiTitle Plumber Example API pr() %>% pr_get("/", function(){ "<html><h1>Programmatic Plumber!</h1></html>" }, serializer = plumber::serializer_html())
If I publish to RStudio Connect the file as is, the API is empty. I wasn't able to find documentation about deploying this structure on Connect.
Any chance this could be added to the pkgdown website?
Thanks :)
The text was updated successfully, but these errors were encountered:
The plumber.R file needs to be plumbI()-able. So it must use annotations vs returning a working pr object.
plumber.R
plumbI()
pr
Untested plumber.R code which uses a @plumber decorator to update the "currently being plumb()ed" router:
@plumber
plumb()
library(plumber) #* @apiTitle Plumber Example API #* @plumber function(pr) { pr %>% pr_get("/", function(){ "<html><h1>Programmatic Plumber!</h1></html>" }, serializer = plumber::serializer_html()) }
Sorry, something went wrong.
@ColinFay You can also name your file entrypoint.R
entrypoint.R
library(plumber) pr() |> pr_get("/", function(){ "<html><h1>Programmatic Plumber!</h1></html>" }, serializer = plumber::serializer_html()) |> pr_set_docs("swagger")
Then deploy to connect
rsconnect::deployApp(appFiles = "entrypoint.R", appMode = "api")
@thomasp85 This still needs a doc update given #868 (comment) answer
No branches or pull requests
Given the following plumber.R:
If I publish to RStudio Connect the file as is, the API is empty. I wasn't able to find documentation about deploying this structure on Connect.
Any chance this could be added to the pkgdown website?
Thanks :)
The text was updated successfully, but these errors were encountered: