Skip to contents

Close the reading room (stop preview server)

Usage

reading_room_close(room = NULL)

Arguments

room

A reading room from reading_room(). If NULL, stops every running preview.

Value

Invisibly returns NULL, called for its side effect of stopping the preview server.

Examples

if (interactive() && requireNamespace("httpuv", quietly = TRUE)) {
  collection <- file.path(tempdir(), "webrarian-close-demo")
  catalog(collection)
  bind(collection)
  room <- reading_room(collection, block = FALSE, open_browser = FALSE)
  reading_room_close(room)
}