source(file.path(usethis::proj_get(), "vignettes", "_common.R")) path <<- "." name <<- "repository" file_fs <- system.file("inst", "configurations", "fs.yml", package = "microservices", mustWork = TRUE) info <- config::get("add_plumber_service", file=file_fs) microservice <- list(files = info$files, dependencies = as.data.frame(info$dependencies)) microservice$files$add <- sapply(microservice$files$add, glue::glue, route_name = name)
Lay the infrastructure for an additional set of services. That includes adding a unit test, adding an endpoint, and extending the entrypointy.
warning("`add_plumber_service` adds a service to pre-existing plumber microservice which you could deploy by calling `use_plumber_microservice`.")
Given a path
("r path
") to a folder and a name
("r name
")
When add_plumber_service
is called
Then the function creates the following files:
And updates the following files:
In scenarios where services are thematically linked to each other. Examples for themes that should be mounted separately:
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.