https://kotlinlang.org logo
#ktor
Title
# ktor
n

Nikky

04/23/2019, 10:49 PM
can ktor (server) be compiled to kotlin-js or only the client ? my intended usecase is a fallback integrated server for a boardgame client in js/jfx
g

gildor

04/24/2019, 12:54 AM
only the client, Ktor server for now JVM only
b

bdawg.io

04/24/2019, 4:27 AM
It would be interesting to get one working with the node
http
module sometime soon though 🙂 More of an interop option for Kotlin
g

gildor

04/24/2019, 5:18 AM
but you can use node’s http module with Kotlin
ktor is much more than that and now depends on many JVM APIs
b

bdawg.io

04/24/2019, 5:22 AM
I agree it’s much more than that, which is why ktor could be very nice on more than just the JVM too (assuming there’s a good common implementation available with alternatives or platform-specific features)
g

gildor

04/24/2019, 5:32 AM
I think that main problem that need for full-blown http JS server is not so clear for Ktor team
it seems for me more like “would be cool to be MPP” than real use case for this
1
K/N server looks much more interesting for me in terms of usecases
also not all required common parts are available yet, but I think it will be ready at some point and we will see MPP Ktor
👌 1
👍 2
b

bdawg.io

04/24/2019, 6:59 AM
My point being it CAN be available. But it's not currently possible at all without porting over a decent amount of code. So whether it's driven by K/N or node or whatever, there's an asynchronous http server (Netty) available for node that could easily be implemented as 3rd party library even if the MPP foundation becomes available
g

gildor

04/24/2019, 7:02 AM
netty for node?
But in general sure, there is
engine
abstraction in Ktro, so it’s abstracted already, but I worry that engine implementation is not enough, there are probably many other JVM dependencies
7 Views