Skip to content

Commit

Permalink
Rename vignette
Browse files Browse the repository at this point in the history
  • Loading branch information
artemklevtsov committed Oct 27, 2019
1 parent 11e01ed commit 8c6c222
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions vignettes/quick-start.Rmd → vignettes/RestRserve.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ knitr::opts_chunk$set(
```

```{r, include = FALSE}
run_bg <- function(expr) {
run_bg = function(expr) {
args = c("--vanilla", "-q")
expr_c = deparse(substitute(expr))
expr_c <- paste(expr_c, collapse = "\n")
expr_c = paste(expr_c, collapse = "\n")
pid = sys::r_background(c(args, "-e", expr_c), std_out = TRUE, std_err = TRUE)
return(pid)
}
Expand Down Expand Up @@ -136,7 +136,7 @@ pid = run_bg({
for (i in 3L:n) x[[i]] = x[[i - 1]] + x[[i - 2]]
x[[n]]
}
fib_handler = function(request, response) {
n = as.integer(request$parameters_query[["n"]])
if (length(n) == 0L || is.na(n)) {
Expand All @@ -145,7 +145,7 @@ pid = run_bg({
response$set_body(as.character(calc_fib(n)))
response$set_content_type("text/plain")
}
app = RestRserve::Application$new()
app$add_get(path = "/fib", FUN = fib_handler)
yaml_file = system.file("examples", "openapi", "openapi.yaml", package = "RestRserve")
Expand Down

0 comments on commit 8c6c222

Please sign in to comment.