View source: R/create_server_yml.R
| create_server_yml | R Documentation |
While you can manually create a plumber2 API by calling api(), you will
often need to deploy the api somewhere else. To facilitate this you can
create a _server.yml that encapsulates all of your settings and plumber
files. If you call api() with a path to such a file the API will be
constructed according to its content.
create_server_yml(..., path = ".", constructor = NULL, freeze_opt = TRUE)
... |
path to files and/or directories that contain annotated plumber files to be used by your API |
path |
The folder to place the generated |
constructor |
The path to a file that creates a plumber2 API object. Can be omitted in which case an API object will be created for you |
freeze_opt |
Logical specifying whether any options you currently have
locally (either as environment variables or R options) should be written to
the |
create_server_yml(
"path/to/a/plumber/file.R"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.