% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/server.R
\name{handler_file}
\alias{handler_file}
\title{Create Static File Handler}
\usage{
handler_file(path, file, prefix = FALSE)
}
\arguments{
\item{path}{URI path to match (e.g., "/favicon.ico").}

\item{file}{Path to the file to serve.}

\item{prefix}{[default FALSE] Logical, if TRUE matches path as a prefix.}
}
\value{
A handler object for use with \code{\link[=http_server]{http_server()}}.
}
\description{
Creates an HTTP handler that serves a single file. NNG handles MIME type
detection automatically.
}
\examples{
\dontshow{if (interactive()) withAutoprint(\{ # examplesIf}
h <- handler_file("/favicon.ico", "~/favicon.ico")
\dontshow{\}) # examplesIf}
}
