Skip to content

Commit

Permalink
Rename vignette (rexyai#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
artemklevtsov authored Oct 27, 2019
1 parent 9a41f5f commit 8565084
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
17 changes: 8 additions & 9 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,29 +1,28 @@
Package: RestRserve
Type: Package
Title: High-Performance Web Server for Building Microservices and App Backends
Description:
Allows to easily create high-performance HTTP API from R functions.
Provides many small convenient tools like flexible logging, JSON encoding,
Title: High-Performance Web Server for Building Microservices and App Backends
Description:
Allows to easily create high-performance HTTP API from R functions.
Provides many small convenient tools like flexible logging, JSON encoding,
utils for app deployment and management.
Version: 0.2.0
Authors@R: c(
person(given = "Dmitriy",
family = "Selivanov",
role = c("aut", "cre"),
email = "[email protected]",
email = "[email protected]",
comment = c(ORCID = "0000-0001-5413-1506")),
person(given = "Artem",
family = "Klevtsov",
role = "aut",
email = "[email protected]",
comment = c(ORCID = "0000-0003-0492-6647")),
person(given = "rexy.ai",
role = c("cph", "fnd"))
)
role = c("cph", "fnd")))
URL: http://restrserve.org, https://github.com/dselivanov/RestRserve
BugReports: https://github.com/dselivanov/RestRserve/issues
License: GPL (>= 2)
Depends:
Depends:
R (>= 3.6.0)
Imports:
methods,
Expand All @@ -42,7 +41,7 @@ Suggests:
rmarkdown,
curl,
sys
LinkingTo:
LinkingTo:
Rcpp
SystemRequirements: C++11
ByteCompile: true
Expand Down
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 8565084

Please sign in to comment.