powered by
Creates an HTTP handler that serves a single file. NNG handles MIME type detection automatically.
handler_file(path, file, prefix = FALSE)
A handler object for use with http_server().
http_server()
URI path to match (e.g., "/favicon.ico").
Path to the file to serve.
[default FALSE] Logical, if TRUE matches path as a prefix.
if (FALSE) { # interactive() h <- handler_file("/favicon.ico", "~/favicon.ico") }
Run the code above in your browser using DataLab