Hi, I'm newbie trying to use KMP to build a full s...
# ktor
s
Hi, I'm newbie trying to use KMP to build a full stack web app using Ktor in jvmMain as back-end and Kotlin-React in jsMain as front-end, How can I add all jsMain source set to ktor watch path to enable automatic reload .
Copy code
fun main() {
    embeddedServer(
        Netty, watchPaths = listOf("jvmMain"), port = 8080,
        module = Application::myModule
    ).start(wait = true)
}
Copy code
fun Application.myModule() {
    routing {
        get("/") {
            call.respondHtml(HttpStatusCode.OK, HTML::index)
        }
        static("/static") {
            resources()
        }
    }
}
n
i recommend to run the gradle task that builds the js output with
-t
and have ktor server that folder in dev env (check for folder existance when setting up the routes)
❤️ 1