inst/routes.R

list(
    "/ping"    = function(...) "pong"
  , "/predict" = function(p, q) {
    list(
      result = predict(
        linear.model,
        newdata = data.frame(x = as.numeric(q$x))
      )[[1]]
    )
  }
  , function(...) list(exception = "catch all route")
)
dvanderbeek/microserver-test documentation built on May 21, 2019, 8:37 a.m.