HTML minifier middleware for ambiorix.
# install.packages("remotes")
remotes::install_github("devOpifex/alesia")
Simply add the middleware, it will minify the output of the
send_file
and render
functions, see man page ?alesia
for options.
library(alesia)
library(ambiorix)
app <- Ambiorix$new()
app$use(alesia())
app$get("/", \(req, res){
res$render(
"home",
data = list(
string = "Hello world!"
)
)
})
app$start()