staticFiles
fun Route.staticFiles(remotePath: String, dir: File, index: String? = "index.html", block: StaticContentConfig<File>.() -> Unit = {}): Route
Sets up RoutingRoot to serve static files. All files inside dir will be accessible recursively at "remotePath/path/to/file". If the requested file is a directory and index is not null
, then response will be index file in the requested directory.
If the requested file doesn't exist, or it is a directory and no index specified, response will be 404 Not Found.
You can use block for additional set up.