Feature

object Feature : BaseApplicationPlugin<Application, Kweb.Feature.Configuration, Kweb> (source)

If you have an existing Ktor server, you can use the Kweb class as a feature. Adding this to your code is easy:

    install(DefaultHeaders)
install(Compression)
install(WebSockets) {
pingPeriod = Duration.ofSeconds(10)
timeout = Duration.ofSeconds(30)
}

install(Kweb) {
// Set debug or plugins here, if you'd like
buildPage = {
// Your app goes here as it would using the Ktor constructor
}
}

Types

Link copied to clipboard

Functions

Link copied to clipboard
open override fun install(pipeline: Application, configure: Kweb.Feature.Configuration.() -> Unit): Kweb

Properties

Link copied to clipboard
open override val key: AttributeKey<Kweb>