Skip to content
ํ”„๋กœ์ ํŠธ

์†Œ๊ฐœ

๐Ÿ–ฅ๏ธ Web framework for R

์›น ๋ฐ ์•ฑ ๊ฐœ๋ฐœ

์ด ์ˆ˜์น˜๋ฅผ ์ธก์ •ํ•˜๋Š” ๋ฐฉ๋ฒ•

์ธก์ •๋œ ์Šคํƒ€ ์ฆ๊ฐ€

in 24h
+1
in 7 days
+1
in 15 days
+1
in 1 month
๊ธฐ๋ก ์ˆ˜์ง‘ ์ค‘

์„œ๋กœ ๊ฒน์น˜๋Š” ๊ธฐ๊ฐ„์˜ ์ˆœ์ฆ๊ฐ€๋Ÿ‰์ด๋ฉฐ ์ผ๋ณ„ ํ•ฉ๊ณ„๊ฐ€ ์•„๋‹™๋‹ˆ๋‹ค. ์ธก์ •๊ฐ’์ด ์—†์œผ๋ฉด ๋น„์›Œ ๋‘ก๋‹ˆ๋‹ค. ์Šคํƒ€๋Š” ๊ด€์‹ฌ๋„๋ฅผ ๋‚˜ํƒ€๋‚ด๋ฉฐ ํ’ˆ์งˆ์„ ๋ณด์žฅํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

README.md

Original

ambiorix

R-CMD-check CRAN status Lifecycle: stable

Website | CLI | Generator | Docker | Load Balancer

Web framework for R based on httpuv and inspired by express.js.

Install

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")

Example

A minimal server:

library(ambiorix)

app <- Ambiorix$new(port = 3000L)

app$get("/", function(req, res) {
  res$send("Hello, World!")
})

app$start()

Run it, then open http://localhost:3000.

Websites and APIs use the same syntax, so one app can serve both:

library(ambiorix)

app <- Ambiorix$new(port = 3000L)

# middleware runs before every route's handler
app$use(function(req, res) {
  req$received_at <- Sys.time()
})

# serves index.html from the same directory
app$get("/", function(req, res) {
  res$send_file("index.html")
})

# path parameters
app$get("/users/:id", function(req, res) {
  res$json(list(id = req$params$id))
})

# POST with a JSON body
app$post("/users", function(req, res) {
  body <- req$parse_json()
  res$json(list(created = body))
})

app$start()

See the docs for more.

Middlewares

Tools & Extensions

Contributing

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.

๊ด€๋ จ ํ”„๋กœ์ ํŠธ ์‚ดํŽด๋ณด๊ธฐ

๋ถˆ๋Ÿฌ์˜ค๋Š” ์ค‘โ€ฆ