inst/examples/send-file/app.R

library(presser)

app <- new_app()
app$use(mw_log())
app$use(mw_etag())

app$get("/logo", function(req, res) {
  res$send_file("Rlogo.png")
})

app$listen(3000L)

Try the presser package in your browser

Any scripts or data that you put into this service are public.

presser documentation built on July 1, 2020, 5:49 p.m.