defineKtor

fun <K : Krosstalk, KrosstalkServer<KtorServerScope<*>>> K.defineKtor(route: Route)
fun <K : Krosstalk, KrosstalkServer<KtorServerScope<*>>> K.defineKtor(application: Application)

Defines the necessary routes for this's methods.

If called in a non-root route, ensure that the client is configured to call the right URLs. You can set Krosstalk.prefix differently or set the URL in the client's server (how will depend on your client implementation).

Meant to be called from an Application, like:

fun Application.server(){
routing{
MyKrosstalk.defineKtor(this)
}
}

See also