← Back to all sparks
S

servr

INFRA · APIS
Velocity0.0

Simple HTTP server in R for serving static files and live-reloading previews

servr keeps growing from a static file server into a general-purpose R web server.

r-web-serverlive-previewhttp-authrefactoringxfun
Current state
servr's recent releases add server capability rather than polish: 0.28 introduced HTTP authentication across every server function via an `auth` argument, and 0.29 added `httr()` to execute R scripts and render their output as HTML pages while serving a directory, plus a `response` hook for post-processing. 0.33 moves the directory-listing helpers into xfun so they are shared with `xfun::serve_dir()`, and adds a documentation site. The remaining entries are a WebSocket hash-URL fix and a fallback favicon.
Where it's heading
Two threads run through the window. One is capability: auth, script execution, and response post-processing turn what began as a local preview server into something that can serve dynamic, protected content. The other is consolidation — 0.33 pushes shared rendering code up into xfun, thinning servr toward the parts that are actually server-specific. Cadence is slow and irregular; 0.31 to 0.33 spans nearly two years.
Prediction
More of servr's generic rendering internals are likely to migrate into xfun, given 0.33 set that precedent and the packages share a maintainer.

Recent moves

  1. 1mo ago

    servr 0.33 moves directory-listing helpers into xfun

    Adds a documentation site and moves `fileinfo_table()` and `html_doc()` into xfun so directory listings are shared with `xfun::serve_dir()`. Consolidation that shrinks servr to its server-specific core.

    View source ↗
  2. 1y ago

    servr 0.31 adds a fallback favicon

    Serves a fallback favicon.ico when none exists. Removes a console error; changes nothing about what the server can do.

    View source ↗
  3. 2y ago

    servr 0.30 fixes WebSockets on hashed URLs

    Fixes WebSocket failures when the URL contains a hash — the same bug xaringan reported in its own 0.30, since its live preview rides on servr.

    View source ↗
  4. 2y ago

    servr 0.29 runs R scripts as served HTML pages

    Adds `httr()` to run R scripts and render output as HTML while serving a directory, plus a `response` argument on `httd()` for post-processing. A step from serving files toward serving computed pages.

    View source ↗
  5. 2y ago

    servr 0.28 adds HTTP authentication to all servers

    HTTP authentication lands as an `auth` argument on every server function. It makes servr usable for anything beyond a trusted local preview.

    View source ↗
  6. 3y ago

    servr 0.27 fixes vign() error handling and encoding

    Stops `vign()` from looping on a vignette error and fixes a character-encoding issue. Corrective work on the vignette preview path.

    View source ↗