26 lines
748 B
Kotlin
26 lines
748 B
Kotlin
package observer.nelle.plugins
|
|
|
|
import io.ktor.http.*
|
|
import io.ktor.server.application.*
|
|
import io.ktor.server.http.content.*
|
|
import io.ktor.server.response.*
|
|
import io.ktor.server.routing.*
|
|
import io.ktor.server.plugins.statuspages.*
|
|
import kotlinx.css.html
|
|
import java.io.File
|
|
|
|
fun Application.configureRouting() {/*
|
|
// Import status pages plugin
|
|
install(StatusPages) {
|
|
exception<IllegalStateException> { call, cause ->
|
|
call.respondText("App in illegal state as ${cause.message}")
|
|
}
|
|
|
|
statusFile(HttpStatusCode.NotFound, filePattern = "statusPages/404.html")
|
|
}*/
|
|
|
|
routing {
|
|
// Set a static resource path 'resources/content/' to be served
|
|
staticResources("/", "static")
|
|
}
|
|
}
|