staticFileSystem

fun Route.staticFileSystem(remotePath: String, basePath: String?, index: String? = "index.html", fileSystem: FileSystem = FileSystems.getDefault(), block: StaticContentConfig<Path>.() -> Unit = {}): Route

Sets up Routing to serve fileSystem as static content. All paths inside basePath will be accessible recursively at "remotePath/path/to/resource". If requested path doesn't exist and index is not null, then response will be index path in the requested package.

If requested path doesn't exist and no index specified, response will be 404 Not Found.

You can use block for additional set up.