R/api.R

api <- function(path = tempfile(), workers = 2, port = 8000) {
  model_queue_start(path, workers)
  path_api <- system.file("api.R", package = "modelapi", mustWork = TRUE)
  plumber::plumb(path_api)$run(port = port, swagger = TRUE)
}
mrc-ide/modelapi documentation built on June 4, 2019, 5:20 p.m.