resources

fun resources(path: String, location: Resource)

Route requests that match the given pattern to resources relative to the given root location.

See also


fun resources(lookupFunction: (ServerRequest) -> Resource?)

Route to resources using the provided lookup function. If the lookup function provides a Resource for the given request, it will be it will be exposed using a HandlerFunction that handles GET, HEAD, and OPTIONS requests.