
Website | CLI | Generator | Docker | Load Balancer
Web framework for R based on httpuv and inspired by express.js.
The stable version is available on CRAN with:
install.packages("ambiorix")You can also install the development version from Github:
remotes::install_github("ambiorix-web/ambiorix")library(ambiorix)
app <- Ambiorix$new(port = 3000L)
app$get("/", function(req, res) {
res$send("Hello, World!")
})
app$get("/api/v1/users", function(req, res) {
users <- data.frame(
uid = 1:3,
firstname = c("Alice", "Bob", "Cate"),
lastname = c("Queen", "Jeremy", "Reece"),
active = c(TRUE, FALSE, TRUE)
)
res$json(users)
})
app$start()Please note that the ambiorix project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.