Feature
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
}
}
Content copied to clipboard
Types
Link copied to clipboard
class Configuration
Functions
Link copied to clipboard
open override fun install(pipeline: Application, configure: Kweb.Feature.Configuration.() -> Unit): Kweb