Getting Started
Quick Start
Install
{ambiorix}The stable version is available on CRAN:
install.packages("ambiorix")Alternatively, install the development version from GitHub with the {remotes} package:
remotes::install_github("ambiorix-web/ambiorix")Create a new project
Create a directory to hold your application, and make that your working directory:
mkdir hello-world cd hello-worldCreate a new file called
app.R:touch app.RHello, World
Put this in
app.R:library(ambiorix) app <- Ambiorix$new(port = 8000L) app$get("/", \(req, res) { res$send("Hello, World!") }) app$start()Run the app
app.Ris the entrypoint. To start the app, run this on the terminal:Rscript app.RAlternatively, if you’re using an IDE like Rstudio or Positron, highlight everything in
app.Rand run the code.Visit localhost/8000.
You just built your first Ambiorix app.
🎉Congratulations!🎉
Next
Let’s take a closer look at the hello world app: