define
fun <K : Krosstalk, KrosstalkServer<KtorServerScope<*>>> define(base: Route, krosstalk: K)
Content copied to clipboard
Defines the necessary routes for krosstalk'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)
}
}
Content copied to clipboard