| handler_file | R Documentation |
Creates an HTTP handler that serves a single file. NNG handles MIME type detection automatically.
handler_file(path, file, prefix = FALSE)
path |
URI path to match (e.g., "/favicon.ico"). |
file |
Path to the file to serve. |
prefix |
[default FALSE] Logical, if TRUE matches path as a prefix. |
A handler object for use with http_server().
h <- handler_file("/favicon.ico", "~/favicon.ico")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.