alternativeStatics

fun Routing.alternativeStatics(remotePath: String, basePackage: String?, index: String? = "index.html")

Deprecated

Use statics(remotePath, basePackage, index) instead

Replace with

statics(remotePath, basePackage, index)

Sets up Routing to serve resources as static content. All resources inside basePackage will be accessible. If requested resource doesn't exist and index is not null, then response will be index resource in the requested package. If requested resource doesn't exist and no index specified, response will be 404 Not Found.

Return

Unit

Parameters

remotePath

http path that defines requests that fetch statics

basePackage

directory where all the statics are stored

index

name of a fallback file